netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@kernel.org>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Jozsef Kadlecsik <kadlec@netfilter.org>,
	netfilter-devel@vger.kernel.org,
	Michal Kubecek <mkubecek@suse.de>,
	Hannes Reinecke <hare@kernel.org>
Subject: [PATCH] nf_conntrack_proto_udp: do not accept packets with IPS_NAT_CLASH
Date: Mon, 30 Sep 2024 10:53:26 +0200	[thread overview]
Message-ID: <20240930085326.144396-1-hare@kernel.org> (raw)

Commit c46172147ebb changed the logic when to move to ASSURED if
a NAT CLASH is detected. In particular, it moved to ASSURED even
if a NAT CLASH had been detected, with the idea that they will
time out soon (and then the state will be cleared).
However, under high load this caused the timeout to happen too
slow causing an IPVS malfunction.
This patch revert part of that patch, as for NAT CLASH we
should not move to ASSURED at all.

Fixes: c46172147ebb ("netfilter: conntrack: do not auto-delete clash entries on reply")

Signed-off-by: Hannes Reinecke <hare@kernel.org>
---
 net/netfilter/nf_conntrack_proto_udp.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/net/netfilter/nf_conntrack_proto_udp.c b/net/netfilter/nf_conntrack_proto_udp.c
index 0030fbe8885c..def3e06430eb 100644
--- a/net/netfilter/nf_conntrack_proto_udp.c
+++ b/net/netfilter/nf_conntrack_proto_udp.c
@@ -116,10 +116,6 @@ int nf_conntrack_udp_packet(struct nf_conn *ct,
 
 		nf_ct_refresh_acct(ct, ctinfo, skb, extra);
 
-		/* never set ASSURED for IPS_NAT_CLASH, they time out soon */
-		if (unlikely((status & IPS_NAT_CLASH)))
-			return NF_ACCEPT;
-
 		/* Also, more likely to be important, and not a probe */
 		if (stream && !test_and_set_bit(IPS_ASSURED_BIT, &ct->status))
 			nf_conntrack_event_cache(IPCT_ASSURED, ct);
-- 
2.35.3


             reply	other threads:[~2024-09-30  8:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-30  8:53 Hannes Reinecke [this message]
2024-09-30  9:29 ` [PATCH] nf_conntrack_proto_udp: do not accept packets with IPS_NAT_CLASH Florian Westphal
2024-10-08 16:27   ` Yadan Fan
2024-10-08 16:45     ` Florian Westphal
2024-10-10 11:11       ` Yadan Fan

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=20240930085326.144396-1-hare@kernel.org \
    --to=hare@kernel.org \
    --cc=kadlec@netfilter.org \
    --cc=mkubecek@suse.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.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).