diff mbox series

[net-next] ipv6: prevent router_solicitations for team port

Message ID 7c052c3bdf8c1ac48833ace66725adf1f9794711.1679528141.git.lucien.xin@gmail.com (mailing list archive)
State Accepted
Commit 2df9bf4d04d2eb458386a40bac01be22c8808450
Delegated to: Netdev Maintainers
Headers show
Series [net-next] ipv6: prevent router_solicitations for team port | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 18 this patch: 18
netdev/cc_maintainers warning 1 maintainers not CCed: dsahern@kernel.org
netdev/build_clang success Errors and warnings before: 18 this patch: 18
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 18 this patch: 18
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 9 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Xin Long March 22, 2023, 11:35 p.m. UTC
The issue fixed for bonding in commit c2edacf80e15 ("bonding / ipv6: no
addrconf for slaves separately from master") also exists in team driver.
However, we can't just disable ipv6 addrconf for team ports, as 'teamd'
will need it when nsns_ping watch is used in the user space.

Instead of preventing ipv6 addrconf, this patch only prevents RS packets
for team ports, as it did in commit b52e1cce31ca ("ipv6: Don't send rs
packets to the interface of ARPHRD_TUNNEL").

Note that we do not prevent DAD packets, to avoid the changes getting
intricate / hacky. Also, usually sysctl dad_transmits is set to 1 and
only 1 DAD packet will be sent, and by now no libteam user complains
about DAD packets on team ports, unlike RS packets.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
---
 net/ipv6/addrconf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Simon Horman March 23, 2023, 2:41 p.m. UTC | #1
On Wed, Mar 22, 2023 at 07:35:41PM -0400, Xin Long wrote:
> The issue fixed for bonding in commit c2edacf80e15 ("bonding / ipv6: no
> addrconf for slaves separately from master") also exists in team driver.
> However, we can't just disable ipv6 addrconf for team ports, as 'teamd'
> will need it when nsns_ping watch is used in the user space.
> 
> Instead of preventing ipv6 addrconf, this patch only prevents RS packets
> for team ports, as it did in commit b52e1cce31ca ("ipv6: Don't send rs
> packets to the interface of ARPHRD_TUNNEL").
> 
> Note that we do not prevent DAD packets, to avoid the changes getting
> intricate / hacky. Also, usually sysctl dad_transmits is set to 1 and
> only 1 DAD packet will be sent, and by now no libteam user complains
> about DAD packets on team ports, unlike RS packets.
> 
> Signed-off-by: Xin Long <lucien.xin@gmail.com>

Reviewed-by: Simon Horman <simon.horman@corigine.com>
patchwork-bot+netdevbpf@kernel.org March 24, 2023, 9 a.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (main)
by David S. Miller <davem@davemloft.net>:

On Wed, 22 Mar 2023 19:35:41 -0400 you wrote:
> The issue fixed for bonding in commit c2edacf80e15 ("bonding / ipv6: no
> addrconf for slaves separately from master") also exists in team driver.
> However, we can't just disable ipv6 addrconf for team ports, as 'teamd'
> will need it when nsns_ping watch is used in the user space.
> 
> Instead of preventing ipv6 addrconf, this patch only prevents RS packets
> for team ports, as it did in commit b52e1cce31ca ("ipv6: Don't send rs
> packets to the interface of ARPHRD_TUNNEL").
> 
> [...]

Here is the summary with links:
  - [net-next] ipv6: prevent router_solicitations for team port
    https://git.kernel.org/netdev/net-next/c/2df9bf4d04d2

You are awesome, thank you!
diff mbox series

Patch

diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 31e0097878c5..3797917237d0 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -4223,7 +4223,8 @@  static void addrconf_dad_completed(struct inet6_ifaddr *ifp, bool bump_id,
 		  ipv6_accept_ra(ifp->idev) &&
 		  ifp->idev->cnf.rtr_solicits != 0 &&
 		  (dev->flags & IFF_LOOPBACK) == 0 &&
-		  (dev->type != ARPHRD_TUNNEL);
+		  (dev->type != ARPHRD_TUNNEL) &&
+		  !netif_is_team_port(dev);
 	read_unlock_bh(&ifp->idev->lock);
 
 	/* While dad is in progress mld report's source address is in6_addrany.