From: Fernando Fernandez Mancera <fmancera@suse.de>
To: louis.t42@caramail.com, netfilter@vger.kernel.org
Subject: Re: Nftables ct count over 2 counter continues to trigger with only 1 connection
Date: Thu, 23 Oct 2025 16:00:51 +0200 [thread overview]
Message-ID: <055140b7-e2c2-41ed-a8ec-4e8e074d37f9@suse.de> (raw)
In-Reply-To: <trinity-85c72a88-d762-46c3-be97-36f10e5d9796-1761173693813@3c-app-mailcom-bs12>
On 10/23/25 12:54 AM, louis.t42@caramail.com wrote:
> Hello,
>
> I have read the documentation and asked on Stack Exchange but am unable to find an answer to the following behavior.
>
> Given this table and chain where 123.123.123.123 is my own address:
>
> table ip mytable {
> chain mychain {
> type filter hook input priority filter; policy accept;
> ip saddr != 123.123.123.123 drop
> ip saddr 123.123.123.123 ct count over 2 counter
> }
> }
>
> I am establishing a varying number of TCP connections from my own address by connecting via SSH. These show up in "ss -at" and "conntrack -L" as well as disappear once disconnected - all as expected.
>
> With 2 connections open I see "packets 0 bytes 0" on the counter. With 3 connections open I see "packets 6599 bytes 475441".
>
> The question: when disconnecting 2 of the connections (from 3 total back to 1 total) the counter continues to increment. It triggers even when "ss -at" and "conntrack -L" show just one connection with no TIME_WAIT or other entries.
>
> It even continues incrementing after a "conntrack -F" and often feels as though it is a one-way switch once the counter has triggered. Sometimes closing all connections (to 0 total) stops the counter from incrementing.
>
> Is there an explanation as to this "ct count" behavior in more detail?
>
> Thanks.
Yes, this seems buggy. I have reproduced this with upstream kernel and
also on 5.10 so I guess this has been here for a long time. I am working
now on a patch.
Thanks!
next prev parent reply other threads:[~2025-10-23 14:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-22 22:54 Nftables ct count over 2 counter continues to trigger with only 1 connection louis.t42
2025-10-23 11:42 ` Pablo Neira Ayuso
2025-10-23 14:00 ` Fernando Fernandez Mancera [this message]
2025-10-24 11:45 ` Florian Westphal
2025-10-27 13:54 ` louis.t42
2025-10-27 22:25 ` Pablo Neira Ayuso
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=055140b7-e2c2-41ed-a8ec-4e8e074d37f9@suse.de \
--to=fmancera@suse.de \
--cc=louis.t42@caramail.com \
--cc=netfilter@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