Download raw body.
On Tue, Feb 27, 2024 at 02:14:13PM +0100, Alexander Bluhm wrote: > On Tue, Feb 27, 2024 at 11:07:41AM +0100, Claudio Jeker wrote: > > Is it still borked with your diff in? Why is IPv6 always so stupidly > > special? No wonder adoption rate after 30years is nowhere. > > ip6_output -> in6_selectroute -> route6_mpath(ro, dst, NULL, rtableid); > > So mpath distribution does not work for IPv6. > > > > + rt = route_mpath(&inp->inp_route, &sin->sin_addr, NULL, rtableid); > > > > Unrelated but this call is problematic. The issue here is that we have no > > source, try to select one but then a following route_mpath() lookup may > > actually return a different route. This is why local traffic using > > multipath routing exits interfaces with the wrong IP. > > Seems to be a similar issue here. I can have a look. > > > Never figured out how this could be fixed in an elegant way. > > Would it help to use toeplitz as a hash here? > > How can the hash algorithm fix missing hash input? I have some vague memory that tb@ once made something for toeplitz that allowed you to reverse the hash. So maybe that could be useful to start with all possible sources and find the one that returns the right result. On the other hand if a one path goes down then traffic is reshuffled and source IPs will no longer match again. Local originated traffic just has these issues with multipath routing. > Maybe local sockets should never use src address but something else. > Either always NULL to not distribute traffic or some per inp value. Sounds like a good idea. Right now people need some pf(4) tricks or use `route sourceaddr` to only use one common (loopback) IP for all outgoing traffic. -- :wq Claudio