[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 7 Jul 2021 15:25:55 -0700
From: Martin KaFai Lau <kafai@...com>
To: Eric Dumazet <eric.dumazet@...il.com>
CC: "David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
netdev <netdev@...r.kernel.org>,
Eric Dumazet <edumazet@...gle.com>,
Maciej Żenczykowski <maze@...gle.com>
Subject: Re: [PATCH net] ipv6: tcp: drop silly ICMPv6 packet too big messages
On Wed, Jul 07, 2021 at 08:46:30AM -0700, Eric Dumazet wrote:
[ ... ]
> diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
> index 593c32fe57ed13a218492fd6056f2593e601ec79..bc334a6f24992c7b5b2c415eab4b6cf51bf36cb4 100644
> --- a/net/ipv6/tcp_ipv6.c
> +++ b/net/ipv6/tcp_ipv6.c
> @@ -348,11 +348,20 @@ static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr,
> static void tcp_v6_mtu_reduced(struct sock *sk)
> {
> struct dst_entry *dst;
> + u32 mtu;
>
> if ((1 << sk->sk_state) & (TCPF_LISTEN | TCPF_CLOSE))
> return;
>
> - dst = inet6_csk_update_pmtu(sk, READ_ONCE(tcp_sk(sk)->mtu_info));
> + mtu = READ_ONCE(tcp_sk(sk)->mtu_info);
> +
> + /* Drop requests trying to increase our current mss.
> + * Check done in __ip6_rt_update_pmtu() is too late.
> + */
> + if (tcp_mss_to_mtu(sk, mtu) >= tcp_sk(sk)->mss_cache)
Instead of tcp_mss_to_mtu, should this be calling tcp_mtu_to_mss to
compare with tcp_sk(sk)->mss_cache?
Powered by blists - more mailing lists