diff options
author | Rocco Yue <rocco.yue@mediatek.com> | 2021-08-03 14:02:50 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-08-04 11:01:26 +0200 |
commit | 8679c31e0284aa3aaba038035e443180b5bacb99 (patch) | |
tree | 62e672e4e10faa37fc8108a95236b14327c7114e /net/ipv4/devinet.c | |
parent | af_unix: Add OOB support (diff) | |
download | linux-8679c31e0284aa3aaba038035e443180b5bacb99.tar.xz linux-8679c31e0284aa3aaba038035e443180b5bacb99.zip |
net: add extack arg for link ops
Pass extack arg to validate_linkmsg and validate_link_af callbacks.
If a netlink attribute has a reject_message, use the extended ack
mechanism to carry the message back to user space.
Signed-off-by: Rocco Yue <rocco.yue@mediatek.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/devinet.c')
-rw-r--r-- | net/ipv4/devinet.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index c82aded8da7d..f4468980b675 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c @@ -1950,7 +1950,8 @@ static const struct nla_policy inet_af_policy[IFLA_INET_MAX+1] = { }; static int inet_validate_link_af(const struct net_device *dev, - const struct nlattr *nla) + const struct nlattr *nla, + struct netlink_ext_ack *extack) { struct nlattr *a, *tb[IFLA_INET_MAX+1]; int err, rem; @@ -1959,7 +1960,7 @@ static int inet_validate_link_af(const struct net_device *dev, return -EAFNOSUPPORT; err = nla_parse_nested_deprecated(tb, IFLA_INET_MAX, nla, - inet_af_policy, NULL); + inet_af_policy, extack); if (err < 0) return err; |