diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2017-06-25 17:56:01 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-26 23:13:22 -0400 |
commit | a8b8a889e369de82f295f55455adb4a7c31c458c (patch) | |
tree | 102e9d3c011ac2f5fdc8992107c1124067684c02 /drivers/net/veth.c | |
parent | ad744b223c521b1e01752a826774545c3e3acd8e (diff) |
net: add netlink_ext_ack argument to rtnl_link_ops.validate
Add support for extended error reporting.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Acked-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/veth.c')
-rw-r--r-- | drivers/net/veth.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/veth.c b/drivers/net/veth.c index 3db907cb7d07..b33553b1e19c 100644 --- a/drivers/net/veth.c +++ b/drivers/net/veth.c | |||
@@ -329,7 +329,8 @@ static void veth_setup(struct net_device *dev) | |||
329 | * netlink interface | 329 | * netlink interface |
330 | */ | 330 | */ |
331 | 331 | ||
332 | static int veth_validate(struct nlattr *tb[], struct nlattr *data[]) | 332 | static int veth_validate(struct nlattr *tb[], struct nlattr *data[], |
333 | struct netlink_ext_ack *extack) | ||
333 | { | 334 | { |
334 | if (tb[IFLA_ADDRESS]) { | 335 | if (tb[IFLA_ADDRESS]) { |
335 | if (nla_len(tb[IFLA_ADDRESS]) != ETH_ALEN) | 336 | if (nla_len(tb[IFLA_ADDRESS]) != ETH_ALEN) |
@@ -374,7 +375,7 @@ static int veth_newlink(struct net *src_net, struct net_device *dev, | |||
374 | if (err < 0) | 375 | if (err < 0) |
375 | return err; | 376 | return err; |
376 | 377 | ||
377 | err = veth_validate(peer_tb, NULL); | 378 | err = veth_validate(peer_tb, NULL, extack); |
378 | if (err < 0) | 379 | if (err < 0) |
379 | return err; | 380 | return err; |
380 | 381 | ||