@@ -430,7 +430,6 @@ static int do_vrf_add_slave(struct net_device *dev, struct net_device *port_dev)
if (ret < 0)
goto out_unregister;
- port_dev->flags |= IFF_SLAVE;
port_dev->priv_flags |= IFF_L3MDEV;
__vrf_insert_slave(queue, slave);
cycle_netdev(port_dev);
@@ -460,7 +459,6 @@ static int do_vrf_del_slave(struct net_device *dev, struct net_device *port_dev)
struct slave *slave;
netdev_upper_dev_unlink(port_dev, dev);
- port_dev->flags &= ~IFF_SLAVE;
port_dev->priv_flags &= ~IFF_L3MDEV;
netdev_rx_handler_unregister(port_dev);
@@ -3831,7 +3831,7 @@ static inline bool netif_is_l3_master(const struct net_device *dev)
static inline bool netif_is_l3_slave(const struct net_device *dev)
{
- return dev->flags & IFF_SLAVE && dev->priv_flags & IFF_L3MDEV;
+ return !(dev->flags & IFF_MASTER) && dev->priv_flags & IFF_L3MDEV;
}
static inline bool netif_is_bridge_master(const struct net_device *dev)
Use of IFF_SLAVE flag causes problems with IPv6. addrconf_notify does not respond to netdev events for devices with IFF_SLAVE set. This breaks DAD, neighbor discovery and spirals to non-working death for IPv6. L3 master devices will have IFF_MASTER and IFF_L3MDEV set. L3 slave devices will only have IFF_L3MDEV set. Signed-off-by: David Ahern <dsa@cumulusnetworks.com> --- drivers/net/vrf.c | 2 -- include/linux/netdevice.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-)