From: Jay Vosburgh <jv@jvosburgh.net>
To: Hangbin Liu <liuhangbin@gmail.com>
Cc: netdev@vger.kernel.org, Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>, Shuah Khan <shuah@kernel.org>,
linux-kselftest@vger.kernel.org, David Wilder <wilder@us.ibm.com>
Subject: Re: [PATCHv2 1/2] bonding: don't set oif to bond dev when getting NS target destination
Date: Mon, 08 Sep 2025 15:51:33 -0700 [thread overview]
Message-ID: <2850156.1757371893@famine> (raw)
In-Reply-To: <20250908062802.392300-1-liuhangbin@gmail.com>
Hangbin Liu <liuhangbin@gmail.com> wrote:
>Unlike IPv4, IPv6 routing strictly requires the source address to be valid
>on the outgoing interface. If the NS target is set to a remote VLAN interface,
>and the source address is also configured on a VLAN over a bond interface,
>setting the oif to the bond device will fail to retrieve the correct
>destination route.
>
>Fix this by not setting the oif to the bond device when retrieving the NS
>target destination. This allows the correct destination device (the VLAN
>interface) to be determined, so that bond_verify_device_path can return the
>proper VLAN tags for sending NS messages.
>
>Reported-by: David Wilder <wilder@us.ibm.com>
>Closes: https://lore.kernel.org/netdev/aGOKggdfjv0cApTO@fedora/
>Suggested-by: Jay Vosburgh <jv@jvosburgh.net>
>Fixes: 4e24be018eb9 ("bonding: add new parameter ns_targets")
>Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Acked-by: Jay Vosburgh <jv@jvosburgh.net>
>---
>
>v2: split the patch into 2 parts, the kernel change and test update (Jay Vosburgh)
>
>---
> drivers/net/bonding/bond_main.c | 1 -
> 1 file changed, 1 deletion(-)
>
>diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
>index 257333c88710..30cf97f4e814 100644
>--- a/drivers/net/bonding/bond_main.c
>+++ b/drivers/net/bonding/bond_main.c
>@@ -3355,7 +3355,6 @@ static void bond_ns_send_all(struct bonding *bond, struct slave *slave)
> /* Find out through which dev should the packet go */
> memset(&fl6, 0, sizeof(struct flowi6));
> fl6.daddr = targets[i];
>- fl6.flowi6_oif = bond->dev->ifindex;
>
> dst = ip6_route_output(dev_net(bond->dev), NULL, &fl6);
> if (dst->error) {
>--
>2.50.1
>
prev parent reply other threads:[~2025-09-08 22:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-08 6:28 [PATCHv2 1/2] bonding: don't set oif to bond dev when getting NS target destination Hangbin Liu
2025-09-08 6:28 ` [PATCHv2 2/2] selftests: bonding: add vlan over bond testing Hangbin Liu
2025-09-09 23:46 ` Jakub Kicinski
2025-09-10 2:03 ` Hangbin Liu
2025-09-10 2:26 ` Jakub Kicinski
2025-09-08 15:55 ` [PATCHv2 1/2] bonding: don't set oif to bond dev when getting NS target destination David Wilder
2025-09-08 22:51 ` Jay Vosburgh [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2850156.1757371893@famine \
--to=jv@jvosburgh.net \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=liuhangbin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
--cc=wilder@us.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.