From: Florian Westphal <fw@strlen.de>
To: Ali Abdallah <ali.abdallah@suse.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] conntrack_tcp: Reset the max ACK flag on SYN in ignore state
Date: Thu, 8 Apr 2021 11:04:59 +0200 [thread overview]
Message-ID: <20210408090459.GQ13699@breakpoint.cc> (raw)
In-Reply-To: <20210408061203.35kbl44elgz4resh@Fryzen495>
Ali Abdallah <ali.abdallah@suse.com> wrote:
> In ignore state, we let SYN goes in original, the server might respond
> with RST/ACK, and that RST packet is erroneously dropped because of the
> flag IP_CT_TCP_FLAG_MAXACK_SET being already set.
> ---
> net/netfilter/nf_conntrack_proto_tcp.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c
> index ec23330687a5..891a66e35afd 100644
> --- a/net/netfilter/nf_conntrack_proto_tcp.c
> +++ b/net/netfilter/nf_conntrack_proto_tcp.c
> @@ -963,6 +963,9 @@ int nf_conntrack_tcp_packet(struct nf_conn *ct,
>
> ct->proto.tcp.last_flags =
> ct->proto.tcp.last_wscale = 0;
> + /* Reset the max ack flag so in case the server replies
> + * with RST/ACK it will be marked as an invalid rst */
"not be marked"?
> + ct->proto.tcp.seen[dir].flags &= ~IP_CT_TCP_FLAG_MAXACK_SET;
> tcp_options(skb, dataoff, th, &seen);
> if (seen.flags & IP_CT_TCP_FLAG_WINDOW_SCALE) {
next prev parent reply other threads:[~2021-04-08 9:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-08 6:12 [PATCH] conntrack_tcp: Reset the max ACK flag on SYN in ignore state Ali Abdallah
2021-04-08 9:04 ` Florian Westphal [this message]
2021-04-13 12:24 ` Ali Abdallah
2021-04-13 13:45 ` Florian Westphal
2021-04-13 13:58 ` Ali Abdallah
2021-04-20 11:45 ` 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=20210408090459.GQ13699@breakpoint.cc \
--to=fw@strlen.de \
--cc=ali.abdallah@suse.com \
--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).