summaryrefslogtreecommitdiff
path: root/net/core/rtnetlink.c
diff options
context:
space:
mode:
authorDavid Ahern <dsahern@gmail.com>2018-10-07 20:16:24 -0700
committerDavid S. Miller <davem@davemloft.net>2018-10-08 10:39:04 -0700
commitdac9c9790e542777079999900594fd069ba10489 (patch)
treebcaa1615ea86b788b7b7808956f08677059ee17c /net/core/rtnetlink.c
parent3d0d4337d7a105c5e8ba85c6e7b75437b4c6745e (diff)
net: Add extack to nlmsg_parse
Make sure extack is passed to nlmsg_parse where easy to do so. Most of these are dump handlers and leveraging the extack in the netlink_callback. Signed-off-by: David Ahern <dsahern@gmail.com> Acked-by: Christian Brauner <christian@brauner.io> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/rtnetlink.c')
-rw-r--r--net/core/rtnetlink.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 5564eee1e980..4486e8b7d9d0 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -1909,7 +1909,7 @@ static int rtnl_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *cb)
sizeof(struct rtgenmsg) : sizeof(struct ifinfomsg);
if (nlmsg_parse(cb->nlh, hdrlen, tb, IFLA_MAX,
- ifla_policy, NULL) >= 0) {
+ ifla_policy, cb->extack) >= 0) {
if (tb[IFLA_TARGET_NETNSID]) {
netnsid = nla_get_s32(tb[IFLA_TARGET_NETNSID]);
tgt_net = rtnl_get_net_ns_capable(skb->sk, netnsid);
@@ -3774,7 +3774,7 @@ static int rtnl_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb)
(nlmsg_len(cb->nlh) != sizeof(struct ndmsg) +
nla_attr_size(sizeof(u32)))) {
err = nlmsg_parse(cb->nlh, sizeof(struct ifinfomsg), tb,
- IFLA_MAX, ifla_policy, NULL);
+ IFLA_MAX, ifla_policy, cb->extack);
if (err < 0) {
return -EINVAL;
} else if (err == 0) {