Thread View: linux.kernel.netdev
1 messages
1 total messages
Started by Eric Dumazet
Tue, 17 Nov 2026 08:54
Re: [PATCH v1 net 5/8] tcp: Check ip_sk_accept_pmtu() in tcp_v4_err().
Author: Eric Dumazet
Date: Tue, 17 Nov 2026 08:54
Date: Tue, 17 Nov 2026 08:54
40 lines
10413 bytes
10413 bytes
Le mar. 17 nov. 2026 ร 06:35, Kuniyuki Iwashima <kuniyu@google.com> a รฉcrit :
>
> Currently, tcp_v4_mtu_reduced() checks ip_sk_accept_pmtu()
> after calling inet_csk_update_pmtu(), which is too late.
>
> Even if we configure a socket not to perform Path MTU
> Discovery with IP_PMTUDISC_INTERFACE, ICMP_FRAG_NEEDED
> can overwrite MTU.
>
> The last getsockopt() returns 1200 MTU:
>
> --ip_version=ipv4
> 0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
> +0 bind(3, ..., ...) = 0
> +0 listen(3, 1) = 0
> +0 < S 0:0(0) win 65535 <mss 1460,sackOK,nop,nop,nop,wscale 8>
> +0 > S. 0:0(0) ack 1 <mss 1460,nop,nop,sackOK,nop,wscale 9>
> +0 < . 1:1(0) ack 1 win 257
> +0 accept(3, ..., ...) = 4
> +0 setsockopt(4, SOL_IP, IP_MTU_DISCOVER, [4], 4) = 0
> +0 getsockopt(4, SOL_IP, IP_MTU, [1500], [4]) = 0
> +0 write(4, ..., 1000) = 1000
> +0 > P. 1:1001(1000) ack 1
> +0 < icmp unreachable frag_needed mtu 1200 [1:1001(1000)]
> +0 getsockopt(4, SOL_IP, IP_MTU, [1500], [4]) = 0
>
> Let's check ip_sk_accept_pmtu() in tcp_v4_err() as done
> in tcp_v6_err().
>
> Note that inet_sk(sk)->pmtudisc is configured locklessly,
> so we do not recheck it in tcp_v4_mtu_reduced(). This is
> same with tcp_v6_mtu_reduced() too.
>
> Fixes: 482fc6094afa ("ipv4: introduce new IP_MTU_DISCOVER mode IP_PMTUDISC_INTERFACE")
> Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Eric Dumazet <edumazet@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