net: add address assign type "SET"
This is the way to indicate that mac address of a device has been set by dev_set_mac_address() Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
e41b2d7fe7
commit
fbdeca2d77
@@ -5022,6 +5022,7 @@ int dev_set_mac_address(struct net_device *dev, struct sockaddr *sa)
|
||||
err = ops->ndo_set_mac_address(dev, sa);
|
||||
if (err)
|
||||
return err;
|
||||
dev->addr_assign_type = NET_ADDR_SET;
|
||||
call_netdevice_notifiers(NETDEV_CHANGEADDR, dev);
|
||||
add_device_randomness(dev->dev_addr, dev->addr_len);
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user