net: add IFF_NO_ADDRCONF and use it in bonding to prevent ipv6 addrconf
authorXin Long <lucien.xin@gmail.com>
Fri, 9 Dec 2022 15:21:38 +0000 (10:21 -0500)
committerJakub Kicinski <kuba@kernel.org>
Mon, 12 Dec 2022 23:18:25 +0000 (15:18 -0800)
commit8a321cf7becc6c065ae595b837b826a2a81036b9
tree5a270103ce4029003641188384a70b2f649986b2
parent1280d4b76f3402645aa7075a53f49a3a14be07a8
net: add IFF_NO_ADDRCONF and use it in bonding to prevent ipv6 addrconf

Currently, in bonding it reused the IFF_SLAVE flag and checked it
in ipv6 addrconf to prevent ipv6 addrconf.

However, it is not a proper flag to use for no ipv6 addrconf, for
bonding it has to move IFF_SLAVE flag setting ahead of dev_open()
in bond_enslave(). Also, IFF_MASTER/SLAVE are historical flags
used in bonding and eql, as Jiri mentioned, the new devices like
Team, Failover do not use this flag.

So as Jiri suggested, this patch adds IFF_NO_ADDRCONF in priv_flags
of the device to indicate no ipv6 addconf, and uses it in bonding
and moves IFF_SLAVE flag setting back to its original place.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/bonding/bond_main.c
include/linux/netdevice.h
net/ipv6/addrconf.c