Commit d116ffc7 authored by Matthias Schiffer's avatar Matthias Schiffer Committed by David S. Miller

net: add netlink_ext_ack argument to rtnl_link_ops.slave_validate

Add support for extended error reporting.
Signed-off-by: default avatarMatthias Schiffer <mschiffer@universe-factory.net>
Acked-by: default avatarDavid Ahern <dsahern@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 17dd0ec4
...@@ -91,7 +91,8 @@ struct rtnl_link_ops { ...@@ -91,7 +91,8 @@ struct rtnl_link_ops {
int slave_maxtype; int slave_maxtype;
const struct nla_policy *slave_policy; const struct nla_policy *slave_policy;
int (*slave_validate)(struct nlattr *tb[], int (*slave_validate)(struct nlattr *tb[],
struct nlattr *data[]); struct nlattr *data[],
struct netlink_ext_ack *extack);
int (*slave_changelink)(struct net_device *dev, int (*slave_changelink)(struct net_device *dev,
struct net_device *slave_dev, struct net_device *slave_dev,
struct nlattr *tb[], struct nlattr *tb[],
......
...@@ -2601,7 +2601,8 @@ static int rtnl_newlink(struct sk_buff *skb, struct nlmsghdr *nlh, ...@@ -2601,7 +2601,8 @@ static int rtnl_newlink(struct sk_buff *skb, struct nlmsghdr *nlh,
slave_data = slave_attr; slave_data = slave_attr;
} }
if (m_ops->slave_validate) { if (m_ops->slave_validate) {
err = m_ops->slave_validate(tb, slave_data); err = m_ops->slave_validate(tb, slave_data,
extack);
if (err < 0) if (err < 0)
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment