[PATCH] ipv6: socket SO_BINDTODEVICE lookup routing fail without IPv6 rule.
David Ahern
dsahern at kernel.org
Thu Jan 2 07:57:17 PST 2025
On 1/2/25 2:51 AM, shiming cheng wrote:
> When using socket IPv6 with SO_BINDTODEVICE, if IPv6 rule is not
> matched, it will return ENETUNREACH. In fact, IPv4 does not behave
> this way. IPv4 prioritizes looking up IP rules for routing and
> forwarding, if not matched it will use socket-bound out interface
> to send packets. The modification here is to make IPv6 behave the
> same as IPv4. If IP rule is not found, it will also use
> socket-bound out interface to send packts.
>
Please create test cases for IPv4 and IPv6 showing the problem - what
you are configuring and the expected result.
Also, commit messages should align with first column unless there is a
reason for an indentation.
More information about the linux-arm-kernel
mailing list