From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Romain Bellan <romain.bellan@wifirst.fr>
Cc: netfilter-devel@vger.kernel.org,
Florent Fourcot <florent.fourcot@wifirst.fr>
Subject: Re: [PATCH nf-next v5 1/1] netfilter: ctnetlink: add kernel side filtering for dump
Date: Sun, 26 Apr 2020 23:43:38 +0200 [thread overview]
Message-ID: <20200426214338.GA2276@salvia> (raw)
In-Reply-To: <20200330204637.11472-1-romain.bellan@wifirst.fr>
Hi Florent, Romain,
On Mon, Mar 30, 2020 at 10:46:37PM +0200, Romain Bellan wrote:
> Conntrack dump does not support kernel side filtering (only get exists,
> but it returns only one entry. And user has to give a full valid tuple)
>
> It means that userspace has to implement filtering after receiving many
> irrelevant entries, consuming resources (conntrack table is sometimes
> very huge, much more than a routing table for example).
>
> This patch adds filtering in kernel side. To achieve this goal, we:
>
> * Add a new CTA_FILTER netlink attributes, actually a flag list to
> parametize filtering
> * Convert some *nlattr_to_tuple() functions, to allow a partial parsing
> of CTA_TUPLE_ORIG and CTA_TUPLE_REPLY (so nf_conntrack_tuple it not
> fully set)
Still some issues here running conntrack-tools/tests/conntrack/test-conntrack.c
with your patch v5 on top of nf-next, it reports:
OK: 84 BAD: 38
it should say:
OK: 122 BAD: 0
The test this needs to be compiled via:
gcc -lnetfilter_conntrack test-conntrack.c -o test
I'm attaching the log for the run of your patch v5.
Have a look at the "BAD" pattern which provides tells what conntrack
command stopped working.
Thanks for working on this.
next prev parent reply other threads:[~2020-04-26 21:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-30 20:46 [PATCH nf-next v5 1/1] netfilter: ctnetlink: add kernel side filtering for dump Romain Bellan
2020-04-26 21:43 ` Pablo Neira Ayuso [this message]
2020-05-04 19:37 ` Florent Fourcot
2020-05-05 19:14 ` Pablo Neira Ayuso
2020-05-29 18:04 ` Pablo Neira Ayuso
2020-06-04 16:08 ` Florent Fourcot
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=20200426214338.GA2276@salvia \
--to=pablo@netfilter.org \
--cc=florent.fourcot@wifirst.fr \
--cc=netfilter-devel@vger.kernel.org \
--cc=romain.bellan@wifirst.fr \
/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).