summaryrefslogtreecommitdiffstats
path: root/drivers/net/team/team.c
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2022-12-09 16:21:39 +0100
committerJakub Kicinski <kuba@kernel.org>2022-12-13 00:18:25 +0100
commit0aa64df30b382fc71d4fb1827d528e0eb3eff854 (patch)
treece2f838d3eea2c9527af70860e36736044e322e6 /drivers/net/team/team.c
parentnet: add IFF_NO_ADDRCONF and use it in bonding to prevent ipv6 addrconf (diff)
downloadlinux-0aa64df30b382fc71d4fb1827d528e0eb3eff854.tar.xz
linux-0aa64df30b382fc71d4fb1827d528e0eb3eff854.zip
net: team: use IFF_NO_ADDRCONF flag to prevent ipv6 addrconf
This patch is to use IFF_NO_ADDRCONF flag to prevent ipv6 addrconf for Team port. This flag will be set in team_port_enter(), which is called before dev_open(), and cleared in team_port_leave(), called after dev_close() and the err path in team_port_add(). Signed-off-by: Xin Long <lucien.xin@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to '')
-rw-r--r--drivers/net/team/team.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index d10606f257c4..fcd43d62d86b 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -1044,6 +1044,7 @@ static int team_port_enter(struct team *team, struct team_port *port)
goto err_port_enter;
}
}
+ port->dev->priv_flags |= IFF_NO_ADDRCONF;
return 0;
@@ -1057,6 +1058,7 @@ static void team_port_leave(struct team *team, struct team_port *port)
{
if (team->ops.port_leave)
team->ops.port_leave(team, port);
+ port->dev->priv_flags &= ~IFF_NO_ADDRCONF;
dev_put(team->dev);
}