forked from luck/tmp_suning_uos_patched
net: add netlink_ext_ack argument to rtnl_link_ops.slave_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>
This commit is contained in:
parent
17dd0ec470
commit
d116ffc770
|
@ -91,7 +91,8 @@ struct rtnl_link_ops {
|
|||
int slave_maxtype;
|
||||
const struct nla_policy *slave_policy;
|
||||
int (*slave_validate)(struct nlattr *tb[],
|
||||
struct nlattr *data[]);
|
||||
struct nlattr *data[],
|
||||
struct netlink_ext_ack *extack);
|
||||
int (*slave_changelink)(struct net_device *dev,
|
||||
struct net_device *slave_dev,
|
||||
struct nlattr *tb[],
|
||||
|
|
|
@ -2601,7 +2601,8 @@ static int rtnl_newlink(struct sk_buff *skb, struct nlmsghdr *nlh,
|
|||
slave_data = slave_attr;
|
||||
}
|
||||
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)
|
||||
return err;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user