From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Matthias Taube <no_html.max50kb@nurfuerspam.de>
Cc: netfilter@vger.kernel.org
Subject: Re: nftables: How to add bordering ip-ranges to a named set
Date: Thu, 7 Jul 2016 20:33:20 +0200 [thread overview]
Message-ID: <20160707183029.GA1317@salvia> (raw)
In-Reply-To: <nljcua$m72$1@ger.gmane.org>
On Wed, Jul 06, 2016 at 06:51:21PM +0200, Matthias Taube wrote:
> Hi,
>
> if I define a named set in nftables
> >nft 'add set inet filter black2 {type ipv4_addr; flags interval; }'
> >nft add element inet filter black2 { 192.168.1.1/24 }
>
> it is not possible to add bordering ip-ranges:
> >nft add element inet filter black2 { 192.168.2.1/24 }
> ><cmdline>:1:1-49: Error: Could not process rule: File exists
> >add element inet filter black2 { 192.168.2.1/24 }
> >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> but if I add the ranges in ONE command it works:
> >nft add element inet filter black2 { 192.168.1.1/24, 192.168.2.1/24 }
>
> then the ranges are put together to one ip-range:
> ># nft list set inet filter black2
> >table inet filter {
> > set black2 {
> > type ipv4_addr
> > flags interval
> > elements = { 192.168.1.0-192.168.2.255}
> > }
> >}
>
> How it is possible to create a set to flexible add and delete bordering
> ip-ranges?
This is fixed in the upcoming 4.7, you can give a try to 4.7-rc6. You
also have to install nft 0.6.
next prev parent reply other threads:[~2016-07-07 18:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-06 16:51 nftables: How to add bordering ip-ranges to a named set Matthias Taube
2016-07-07 18:33 ` Pablo Neira Ayuso [this message]
2016-07-08 18:19 ` Matthias Taube
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=20160707183029.GA1317@salvia \
--to=pablo@netfilter.org \
--cc=netfilter@vger.kernel.org \
--cc=no_html.max50kb@nurfuerspam.de \
/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