Commit 34192a2f authored by Paolo Abeni's avatar Paolo Abeni

Merge branch 'fix-up-dev-flags-when-add-p2p-down-link'

Hangbin Liu says:

====================
Fix up dev flags when add P2P down link

When adding p2p interfaces to bond/team. The POINTOPOINT, NOARP flags are
not inherit to up devices. Which will trigger IPv6 DAD. Since there is
no ethernet MAC address for P2P devices. This will cause unexpected DAD
failures.
====================

Link: https://lore.kernel.org/r/20230721040356.3591174-1-liuhangbin@gmail.comSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parents f0291103 fa532bee
......@@ -1508,6 +1508,11 @@ static void bond_setup_by_slave(struct net_device *bond_dev,
memcpy(bond_dev->broadcast, slave_dev->broadcast,
slave_dev->addr_len);
if (slave_dev->flags & IFF_POINTOPOINT) {
bond_dev->flags &= ~(IFF_BROADCAST | IFF_MULTICAST);
bond_dev->flags |= (IFF_POINTOPOINT | IFF_NOARP);
}
}
/* On bonding slaves other than the currently active slave, suppress
......
......@@ -2135,6 +2135,15 @@ static void team_setup_by_port(struct net_device *dev,
dev->mtu = port_dev->mtu;
memcpy(dev->broadcast, port_dev->broadcast, port_dev->addr_len);
eth_hw_addr_inherit(dev, port_dev);
if (port_dev->flags & IFF_POINTOPOINT) {
dev->flags &= ~(IFF_BROADCAST | IFF_MULTICAST);
dev->flags |= (IFF_POINTOPOINT | IFF_NOARP);
} else if ((port_dev->flags & (IFF_BROADCAST | IFF_MULTICAST)) ==
(IFF_BROADCAST | IFF_MULTICAST)) {
dev->flags |= (IFF_BROADCAST | IFF_MULTICAST);
dev->flags &= ~(IFF_POINTOPOINT | IFF_NOARP);
}
}
static int team_dev_type_check_change(struct net_device *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