net: dev: Add extack argument to dev_set_mac_address()
A follow-up patch will add a notifier type NETDEV_PRE_CHANGEADDR, which allows vetoing of MAC address changes. One prominent path to that notification is through dev_set_mac_address(). Therefore give this function an extack argument, so that it can be packed together with the notification. Thus a textual reason for rejection (or a warning) can be communicated back to the user. Signed-off-by: Petr Machata <petrm@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
95302c394c
commit
3a37a9636c
@@ -242,7 +242,7 @@ int ieee802154_add_iface(struct sk_buff *skb, struct genl_info *info)
|
||||
* dev_set_mac_address require RTNL_LOCK
|
||||
*/
|
||||
rtnl_lock();
|
||||
rc = dev_set_mac_address(dev, &addr);
|
||||
rc = dev_set_mac_address(dev, &addr, NULL);
|
||||
rtnl_unlock();
|
||||
if (rc)
|
||||
goto dev_unregister;
|
||||
|
Reference in New Issue
Block a user