From: Pablo Neira Ayuso <pablo@netfilter.org>
To: ѽ҉ᶬḳ℠ <vtol@gmx.net>
Cc: "netfilter@vger.kernel.org" <netfilter@vger.kernel.org>
Subject: Re: [nftables] sets update concatenation?
Date: Sat, 26 Sep 2020 21:07:54 +0200 [thread overview]
Message-ID: <20200926190754.GA3748@salvia> (raw)
In-Reply-To: <3fcc0be7-b4f8-c17e-96bb-8cef53f375c5@gmx.net>
On Sat, Sep 26, 2020 at 06:44:00PM +0000, ѽ҉ᶬḳ℠ wrote:
>
> On 26/09/2020 20:21, Pablo Neira Ayuso wrote:
> > On Fri, Sep 25, 2020 at 07:10:00PM +0000, ѽ҉ᶬḳ℠ wrote:
> > > Been trying to concatenate sets update:
> > >
> > > tcp dport @b_t update @b_sa4 { ip saddr } drop;
> > > tcp dport @b_t update @b_sa6 { ip6 saddr } drop;
> > >
> > > with:
> > >
> > > tcp dport @b_t update @b_sa4 . @b_sa4 { ip saddr . ip6 saddr } drop;
> > What's the intention here?
> >
> > > but that did not work out. Is somehow possible to concatenate sets update?
> > Yes, you can do:
> >
> > tcp dport @b_t update @b_sa4 { ip saddr . ip6 saddr } drop
> >
> > You can update one single set at a time. Not sure what you expect from
> > this concatenating sets instead of keys.
>
> The two mentioned sets are dynamic, learning ip | ip6 saddrs from hits on
> tcp dport.
>
> The intended concatenation was to put it into one rule instead of two, like
> if ip saddr then update element in set @b_sa4 and if ip6 saddr then update
> element in set @b_sa6 respectively.
So you would like to consolidate:
tcp dport @b_t update @b_sa4 { ip saddr } drop
tcp dport @b_t update @b_sa6 { ip6 saddr } drop
In one single rule?
Something like (hypothetical syntax)
tcp dport @b_t update @b_sa { inet saddr } drop
where b_sa is a set with something like type inet_addr.
next prev parent reply other threads:[~2020-09-26 19:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-25 19:10 [nftables] sets update concatenation? ѽ҉ᶬḳ℠
2020-09-26 18:21 ` Pablo Neira Ayuso
2020-09-26 18:44 ` ѽ҉ᶬḳ℠
2020-09-26 19:07 ` Pablo Neira Ayuso [this message]
2020-09-26 19:21 ` ѽ҉ᶬḳ℠
2020-09-26 19:47 ` 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=20200926190754.GA3748@salvia \
--to=pablo@netfilter.org \
--cc=netfilter@vger.kernel.org \
--cc=vtol@gmx.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.