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.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
commit
34192a2f46
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user