From: Florian Westphal <fw@strlen.de>
To: Jozsef Kadlecsik <kadlec@netfilter.org>
Cc: Florian Westphal <fw@strlen.de>,
Neal Cardwell <ncardwell@google.com>,
Eric Dumazet <edumazet@google.com>, Jaco Kroon <jaco@uls.co.za>,
netfilter-devel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: linux 5.17.1 disregarding ACK values resulting in stalled TCP connections
Date: Thu, 7 Apr 2022 12:26:57 +0200 [thread overview]
Message-ID: <20220407102657.GB16047@breakpoint.cc> (raw)
In-Reply-To: <726cf53c-f6aa-38a9-71c4-52fb2457f818@netfilter.org>
Jozsef Kadlecsik <kadlec@netfilter.org> wrote:
> I'd merge the two conditions so that it'd cover both original condition
> branches:
>
> diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c
> index 8ec55cd72572..87375ce2f995 100644
> --- a/net/netfilter/nf_conntrack_proto_tcp.c
> +++ b/net/netfilter/nf_conntrack_proto_tcp.c
> @@ -556,33 +556,26 @@ static bool tcp_in_window(struct nf_conn *ct,
> }
>
> }
> - } else if (((state->state == TCP_CONNTRACK_SYN_SENT
> - && dir == IP_CT_DIR_ORIGINAL)
> - || (state->state == TCP_CONNTRACK_SYN_RECV
> - && dir == IP_CT_DIR_REPLY))
> - && after(end, sender->td_end)) {
> + } else if (tcph->syn &&
> + ((after(end, sender->td_end) &&
> + (state->state == TCP_CONNTRACK_SYN_SENT ||
> + state->state == TCP_CONNTRACK_SYN_RECV)) ||
> + (dir == IP_CT_DIR_REPLY &&
> + state->state == TCP_CONNTRACK_SYN_SENT))) {
Thats what I did as well, I merged the two branches but I made the
2nd clause stricter to also consider the after() test; it would no
longer re-init for syn-acks when sequence did not advance.
Then, dir == IP_CT_DIR_REPLY && state == SYN_SENT is already covered
by earlier test and can be elided.
I'm fine with your version though, will you submit a patch?
next prev parent reply other threads:[~2022-04-07 10:27 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1nZMdl-0006nG-0J@plastiekpoot>
2022-03-30 2:01 ` linux 5.17.1 disregarding ACK values resulting in stalled TCP connections 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
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
2022-04-06 13:58 ` Florian Westphal
2022-04-06 19:04 ` Jozsef Kadlecsik
2022-04-07 10:26 ` Florian Westphal [this message]
2022-04-07 12:48 ` Jozsef Kadlecsik
2022-04-21 21:14 ` Eric Dumazet
2022-04-25 9:29 ` Florian Westphal
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=20220407102657.GB16047@breakpoint.cc \
--to=fw@strlen.de \
--cc=edumazet@google.com \
--cc=jaco@uls.co.za \
--cc=kadlec@netfilter.org \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).