Thread View: linux.kernel.netdev
1 messages
1 total messages
Started by David Ahern
Thu, 19 Nov 2026 15:22
Re: [PATCH v1 net 7/8] tcp: Pass inet_sdif() to __inet_lookup_established() in tcp_v4_err().
Author: David Ahern
Date: Thu, 19 Nov 2026 15:22
Date: Thu, 19 Nov 2026 15:22
36 lines
8988 bytes
8988 bytes
On 11/16/26 11:35 PM, Kuniyuki Iwashima wrote:
> tcp_v4_err() passes 0 sdif to __inet_lookup_established().
>
> So, ICMP error coming from VRF can be leaked to a socket not
> bound to the device.
>
> For example, this test fails at the last assert because the
> socket receives ICMP error:
>
> --ip_version=ipv4
> 0 socket(..., SOCK_STREAM|SOCK_NONBLOCK, IPPROTO_TCP) = 3
> +0 connect(3, ..., ...) = -1 EINPROGRESS (Operation now in progress)
> +0 > S 0:0(0) <...>
> +0 `ip link add vrf0 type vrf table 10`
> +0 `ip link set vrf0 up`
> +0 `ip link set dev tun0 master vrf0`
> +0 `ip route add 192.0.2.0/24 dev tun0 table 10`
> +0 < icmp unreachable port_unreachable [0:0(0)]
> +0 %{ assert tcpi_state == TCP_SYN_SENT, tcpi_state }%
>
> Let's pass inet_sdif() to __inet_lookup_established().
>
> Fixes: 3fa6f616a7a4 ("net: ipv4: add second dif to inet socket lookups")
> Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
> ---
> Cc: David Ahern <dsahern@kernel.org>
just this one is needed.
> Cc: David Ahern <dsahern@gmail.com>
> ---
> net/ipv4/tcp_ipv4.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Reviewed-by: David Ahern <dsahern@kernel.org>
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads