Re: [PATCH v2] net: setsockopt: fix IPV6_UNICAST_IF option for connected sockets

From: David Ahern
Date: Thu Dec 08 2022 - 12:42:48 EST


On 12/8/22 7:54 AM, Richard Gobert wrote:
> Change the behaviour of ip6_datagram_connect to consider the interface
> set by the IPV6_UNICAST_IF socket option, similarly to udpv6_sendmsg.
>
> This change is the IPv6 counterpart of the fix for IP_UNICAST_IF.
> The tests introduced by that patch showed that the incorrect
> behavior is present in IPv6 as well.
> This patch fixes the broken test.
>
> Reported-by: kernel test robot <oliver.sang@xxxxxxxxx>
> Link: https://lore.kernel.org/r/202210062117.c7eef1a3-oliver.sang@xxxxxxxxx
> Fixes: 0e4d354762ce ("net-next: Fix IP_UNICAST_IF option behavior for connected sockets")
>
> Signed-off-by: Richard Gobert <richardbgobert@xxxxxxxxx>
> ---
> net/ipv6/datagram.c | 15 ++++++++++-----
> 1 file changed, 10 insertions(+), 5 deletions(-)
>

Reviewed-by: David Ahern <dsahern@xxxxxxxxxx>