Thread (18 messages) 18 messages, 5 authors, 2025-08-08

Re: [PATCH net-next v4 0/7] bonding: Extend arp_ip_target format to allow for a list of vlan tags.

From: Hangbin Liu <hidden>
Date: 2025-08-08 10:17:43

On Thu, Aug 07, 2025 at 11:10:20AM -0700, Jay Vosburgh wrote:
quoted
quoted
This is a key difference between IPv6 and IPv4:
In IPv4, it's possible to get a destination route via the bond even when the
source IP is configured on a different interface. But in IPv6, the routing
mechanism is stricter in requiring the source address to be valid on the
outgoing interface.

I'm not sure how to fix this yet, as it's fundamentally tied to how IPv6
routing behaves.
I am thinking that we don't need to do a route lookup as if we are sending
from the bonding interface.  We only need to find the interface we should
send the packet through.  As if we ran "ip route get <dest addr>".
	Assuming I'm following correctly, the whole point of the route
lookup is to determine which interface the ARP (or NS for IPv6) should
nominally sent through (based on the destination address).  This serves
two purposes:

	- collecting the VLAN tags,

	- insuring that the ARP / NS won't be sent on a logically
incorrect interface (e.g., its address corresponds to some totally
unrelated interface).

	So, really, I'm agreed that what we're really looking for is
"what is the proper output interface to use to send to destination X,"
which we can then check to see if that interface is logically connected
to the bond (e.g., a VLAN atop the bond).

	Is the solution to call ip6_route_output() with the flowi6_oif
set to zero?  That seems to be what happens for the "ip route get" case
in inet6_rtm_getroute() (he says, looking at the code but not running
actual tests).
Looks reasonable to me. We can find the dst interface first and check
if it's an upper link of the bond interface.

Thanks
Hangbin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help