Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Leon Merten Lohse <leon@green-side.de>
To: netfilter@vger.kernel.org
Subject: Re: nftables: named set for ipv4 networks
Date: Wed, 2 Nov 2016 11:30:06 +0100	[thread overview]
Message-ID: <20161102113006.0b3de6cd@doomgiver> (raw)
In-Reply-To: <20161028162353.7da8573c@doomgiver>

I would really appreciate if someone could comment on this.

The problem is that nft complains about overlapping intervals in the
set, if I load the following ruleset twice.
This occurs even though there is a `flush ruleset' directive at the
beginning of the ruleset. As far as I understand it, all sets should be
empty after that.
Calling `nft flush ruleset' beforehand works around this but is no
longer atomic.

Best
Leon

flush ruleset

table inet filter {
  set blacklist_v4 { type ipv4_addr; flags interval; }
}

add element inet filter blacklist_v4 {
192.168.0.1/24,
}

On Fri, 28 Oct 2016 16:23:53 +0200
Leon Merten Lohse <leon@green-side.de> wrote:

> When I load this ruleset twice, it complains that "interval overlaps
> with an existing one" even though I explicitly do a "flush ruleset" at
> the beginning of the file.
> This problem does not occur if I "nft flush ruleset" first and then
> load the ruleset.
> Do I have to explicitly flush the sets, somehow?

  reply	other threads:[~2016-11-02 10:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-23 19:38 nftables: named set for ipv4 networks Leon Merten Lohse
2016-10-27 19:23 ` Pablo Neira Ayuso
2016-10-27 21:41   ` Leon Merten Lohse
2016-10-28  8:04     ` Pablo Neira Ayuso
2016-10-28 14:23       ` Leon Merten Lohse
2016-11-02 10:30         ` Leon Merten Lohse [this message]
2016-11-03 11:29           ` Arturo Borrero Gonzalez
2016-11-29 23:00             ` Leon Merten Lohse

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=20161102113006.0b3de6cd@doomgiver \
    --to=leon@green-side.de \
    --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