From: Florian Westphal <fw@strlen.de>
To: Vitaly Zuevsky <vzuevsky@ns1.com>
Cc: Florian Westphal <fw@strlen.de>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nf] netfilter: ctnetlink: remove expired entries first
Date: Thu, 9 Dec 2021 18:11:52 +0100 [thread overview]
Message-ID: <20211209171152.GA26636@breakpoint.cc> (raw)
In-Reply-To: <CA+PiBLw3aUEd7X3yt5p7D6=-+EdL3EtFxiqSV8FDb5GuuyyxaQ@mail.gmail.com>
Vitaly Zuevsky <vzuevsky@ns1.com> wrote:
> > diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
> > index 81d03acf68d4..ec4164c32d27 100644
> > --- a/net/netfilter/nf_conntrack_netlink.c
> > +++ b/net/netfilter/nf_conntrack_netlink.c
> > @@ -1195,8 +1195,6 @@ ctnetlink_dump_table(struct sk_buff *skb, struct netlink_callback *cb)
> > }
> > hlist_nulls_for_each_entry(h, n, &nf_conntrack_hash[cb->args[0]],
> > hnnode) {
> > - if (NF_CT_DIRECTION(h) != IP_CT_DIR_ORIGINAL)
> > - continue;
> > ct = nf_ct_tuplehash_to_ctrack(h);
> > if (nf_ct_is_expired(ct)) {
> > if (i < ARRAY_SIZE(nf_ct_evict) &&
> > @@ -1208,6 +1206,9 @@ ctnetlink_dump_table(struct sk_buff *skb, struct netlink_callback *cb)
> > if (!net_eq(net, nf_ct_net(ct)))
> > continue;
> >
> > + if (NF_CT_DIRECTION(h) != IP_CT_DIR_ORIGINAL)
> > + continue;
> > +
> > if (cb->args[1]) {
> > if (ct != last)
> > continue;
> > --
> > 2.32.0
> >
>
> Florian, thanks for prompt turnaround on this. Seeing
> conntrack -C
> 107530
> mandates the check what flows consume this many entries. I cannot do
> this if conntrack -L skips anything while kernel defaults to not
> exposing conntrack table via /proc. This server is not supposed to NAT
> anything by the way.
Then this patch doesn't change anything.
Maybe 'conntrack -L unconfirmed' or 'conntrack -L dying' show something?
next prev parent reply other threads:[~2021-12-09 17:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-09 16:39 [PATCH nf] netfilter: ctnetlink: remove expired entries first Florian Westphal
2021-12-09 17:08 ` Vitaly Zuevsky
2021-12-09 17:11 ` Florian Westphal [this message]
2021-12-09 18:23 ` Vitaly Zuevsky
2021-12-17 18:47 ` Vitaly Zuevsky
2021-12-17 19:04 ` Florian Westphal
2021-12-17 19:49 ` Vitaly Zuevsky
2021-12-23 17:42 ` Vitaly Zuevsky
2021-12-16 13:10 ` 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=20211209171152.GA26636@breakpoint.cc \
--to=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=vzuevsky@ns1.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;
as well as URLs for NNTP newsgroup(s).