Commit cb54d392 authored by Xin Long's avatar Xin Long Committed by Jakub Kicinski

net: failover: use IFF_NO_ADDRCONF flag to prevent ipv6 addrconf

Similar to Bonding and Team, to prevent ipv6 addrconf with
IFF_NO_ADDRCONF in slave_dev->priv_flags for slave ports
is also needed in net failover.

Note that dev_open(slave_dev) is called in .slave_register,
which is called after the IFF_NO_ADDRCONF flag is set in
failover_slave_register().
Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 0aa64df3
...@@ -80,14 +80,14 @@ static int failover_slave_register(struct net_device *slave_dev) ...@@ -80,14 +80,14 @@ static int failover_slave_register(struct net_device *slave_dev)
goto err_upper_link; goto err_upper_link;
} }
slave_dev->priv_flags |= IFF_FAILOVER_SLAVE; slave_dev->priv_flags |= (IFF_FAILOVER_SLAVE | IFF_NO_ADDRCONF);
if (fops && fops->slave_register && if (fops && fops->slave_register &&
!fops->slave_register(slave_dev, failover_dev)) !fops->slave_register(slave_dev, failover_dev))
return NOTIFY_OK; return NOTIFY_OK;
netdev_upper_dev_unlink(slave_dev, failover_dev); netdev_upper_dev_unlink(slave_dev, failover_dev);
slave_dev->priv_flags &= ~IFF_FAILOVER_SLAVE; slave_dev->priv_flags &= ~(IFF_FAILOVER_SLAVE | IFF_NO_ADDRCONF);
err_upper_link: err_upper_link:
netdev_rx_handler_unregister(slave_dev); netdev_rx_handler_unregister(slave_dev);
done: done:
...@@ -121,7 +121,7 @@ int failover_slave_unregister(struct net_device *slave_dev) ...@@ -121,7 +121,7 @@ int failover_slave_unregister(struct net_device *slave_dev)
netdev_rx_handler_unregister(slave_dev); netdev_rx_handler_unregister(slave_dev);
netdev_upper_dev_unlink(slave_dev, failover_dev); netdev_upper_dev_unlink(slave_dev, failover_dev);
slave_dev->priv_flags &= ~IFF_FAILOVER_SLAVE; slave_dev->priv_flags &= ~(IFF_FAILOVER_SLAVE | IFF_NO_ADDRCONF);
if (fops && fops->slave_unregister && if (fops && fops->slave_unregister &&
!fops->slave_unregister(slave_dev, failover_dev)) !fops->slave_unregister(slave_dev, failover_dev))
......
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