mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jaco Kroon <jaco@uls.co.za>
To: Eric Dumazet <edumazet@google.com>
Cc: Neal Cardwell <ncardwell@google.com>,
	Florian Westphal <fw@strlen.de>,
	LKML <linux-kernel@vger.kernel.org>,
	Netdev <netdev@vger.kernel.org>,
	Yuchung Cheng <ycheng@google.com>, Wei Wang <weiwan@google.com>,
	Pablo Neira Ayuso <pablo@netfilter.org>,
	Sven Auhagen <sven.auhagen@voleatech.de>
Subject: Re: linux 5.17.1 disregarding ACK values resulting in stalled TCP connections
Date: Sun, 3 Apr 2022 00:02:20 +0200	[thread overview]
Message-ID: <59762d2f-d4e3-c748-5d41-ef3be85537ed@uls.co.za> (raw)
In-Reply-To: <CANn89iKSFXBx9zYuBFH4-uS3UzAUW+fY7d5aiUkfOa1DdbHDxQ@mail.gmail.com>

Hi,

On 2022/04/02 15:20, Eric Dumazet wrote:

> Great. This confirms our suspicions.
>
> Please try the following patch that landed in 5.18-rc
>
> f2dd495a8d589371289981d5ed33e6873df94ecc netfilter: nf_conntrack_tcp:
> preserve liberal flag in tcp options

Will track this down and deploy in the next day or two.  Thank you, Neal
and Florian for all the assistance!

As an aside, would really like to engage with someone that can assist on
the known congestion w.r.t. Google services in JHB, so if you're willing
- or can get me in contact with the right people, please do contact me
direct off-list (we've alleviated the issue by upgrading out IPT but
would like to understand what is going on, can provide ticket references).


Kind Regards,
Jaco

>
> CC netfilter folks.
>
> Condition triggering the bug :
>    before(seq, sender->td_maxend + 1),
>
> I took a look at the code, and it is not clear if td_maxend is
> properly setup (or if td_scale is cleared at some point while it
> should not)
>
> Alternatively, if conntracking does not know if the connection is
> using wscale (or what is the scale), the "before(seq,
> sender->td_maxend + 1),"
> should not be evaluated/used.
>
> Also, I do not see where td_maxend is extended in tcp_init_sender()
>
> Probably wrong patch, just to point to the code I do not understand yet.
>
> diff --git a/net/netfilter/nf_conntrack_proto_tcp.c
> b/net/netfilter/nf_conntrack_proto_tcp.c
> index 8ec55cd72572e0cca076631e2cc1c11f0c2b86f6..950082785d61b7a2768559c7500d3aee3aaea7c2
> 100644
> --- a/net/netfilter/nf_conntrack_proto_tcp.c
> +++ b/net/netfilter/nf_conntrack_proto_tcp.c
> @@ -456,9 +456,10 @@ static void tcp_init_sender(struct ip_ct_tcp_state *sender,
>         /* SYN-ACK in reply to a SYN
>          * or SYN from reply direction in simultaneous open.
>          */
> -       sender->td_end =
> -       sender->td_maxend = end;
> -       sender->td_maxwin = (win == 0 ? 1 : win);
> +       sender->td_end = end;
> +       sender->td_maxwin = max(win, 1U);
> +       /* WIN in SYN & SYNACK is not scaled */
> +       sender->td_maxend = end + sender->td_maxwin;
>
>         tcp_options(skb, dataoff, tcph, sender);
>         /* RFC 1323:

  reply	other threads:[~2022-04-02 22:02 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-30  0:56 Jaco
2022-03-30  2:01 ` Neal Cardwell
2022-03-30  2:40   ` Eric Dumazet
2022-03-30  2:58   ` Jaco Kroon
2022-03-30  3:48     ` Eric Dumazet
2022-03-30  6:22       ` Jaco Kroon
2022-03-30 13:56         ` Neal Cardwell
2022-03-30 15:00           ` Jaco Kroon
2022-03-30 16:19             ` Eric Dumazet
2022-03-31 15:41               ` Neal Cardwell
2022-03-31 23:06                 ` Jaco Kroon
2022-04-01  0:10                   ` Eric Dumazet
2022-04-01  0:15                     ` Florian Westphal
2022-04-01 11:54                       ` Jaco Kroon
2022-04-01 12:09                         ` Florian Westphal
2022-04-01  0:33                     ` Jaco Kroon
2022-04-01  0:41                       ` Eric Dumazet
2022-04-01  0:54                         ` Eric Dumazet
2022-04-01 11:36                           ` Jaco Kroon
2022-04-01 13:54                             ` Eric Dumazet
2022-04-01 14:50                   ` Neal Cardwell
2022-04-01 15:39                     ` Neal Cardwell
2022-04-01 15:48                       ` Neal Cardwell
2022-04-02  8:42                       ` Jaco Kroon
2022-04-02 13:20                         ` Eric Dumazet
2022-04-02 22:02                           ` Jaco Kroon [this message]
2022-04-02 14:14                         ` Florian Westphal
2022-04-02 15:57                           ` Neal Cardwell
2022-04-02 21:51                           ` Jaco Kroon
2022-04-02 16:29                         ` Neal Cardwell
2022-04-02 16:32                           ` Eric Dumazet
2022-04-02 18:04                             ` Neal Cardwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=59762d2f-d4e3-c748-5d41-ef3be85537ed@uls.co.za \
    --to=jaco@uls.co.za \
    --cc=edumazet@google.com \
    --cc=fw@strlen.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=sven.auhagen@voleatech.de \
    --cc=weiwan@google.com \
    --cc=ycheng@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®