aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorPetr Machata <petrm@mellanox.com>2018-12-13 11:54:35 +0000
committerDavid S. Miller <davem@davemloft.net>2018-12-13 18:41:38 -0800
commitd59cdf9475ad84d1f57cab1d162cf289702cfb15 (patch)
tree192e3f68684228dda9a057f8ff49caf6974892f3 /include/linux/netdevice.h
parentnet: dev: Add NETDEV_PRE_CHANGEADDR (diff)
downloadlinux-dev-d59cdf9475ad84d1f57cab1d162cf289702cfb15.tar.xz
linux-dev-d59cdf9475ad84d1f57cab1d162cf289702cfb15.zip
net: dev: Issue NETDEV_PRE_CHANGEADDR
When a device address is about to be changed, or an address added to the list of device HW addresses, it is necessary to ensure that all interested parties can support the address. Therefore, send the NETDEV_PRE_CHANGEADDR notification, and if anyone bails on it, do not change the address. 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>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 1d5ad053ccf7..811632d4d8b1 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -3634,6 +3634,8 @@ int dev_set_mtu_ext(struct net_device *dev, int mtu,
int dev_set_mtu(struct net_device *, int);
int dev_change_tx_queue_len(struct net_device *, unsigned long);
void dev_set_group(struct net_device *, int);
+int dev_pre_changeaddr_notify(struct net_device *dev, const char *addr,
+ struct netlink_ext_ack *extack);
int dev_set_mac_address(struct net_device *dev, struct sockaddr *sa,
struct netlink_ext_ack *extack);
int dev_change_carrier(struct net_device *, bool new_carrier);