netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: littlesmilingcloud@gmail.com
Cc: netfilter-devel@vger.kernel.org, dau@sunlink.ru
Subject: Re: [nft] strange behaviour
Date: Wed, 23 Sep 2015 00:24:54 +0200	[thread overview]
Message-ID: <20150922222454.GA4740@salvia> (raw)
In-Reply-To: <5601a0c8.vTjiOdyXOkEgHeZy%littlesmilingcloud@gmail.com>

On Tue, Sep 22, 2015 at 09:41:12PM +0300, littlesmilingcloud@gmail.com wrote:
> Hello.
> 
> I have try to add the subnet element to the named set, and nft has closed unexpectly.
> I use the 4.2 stable kernel and latest stable release of libnftnl and nftables from git.
> 
> Reproduce of the strange behaviour.
> --------------------------------------------------------------------------------------
> nft> list ruleset;
> nft> add table ip filter;
> nft> add set ip filter addr_list { type ipv4_addr; }

This should be instead:

nft> add set ip filter addr_list { type ipv4_addr; flags interval; }

> nft> add element ip filter addr_list { 192.168.1.1 }
> nft> add element ip filter addr_list { 192.168.10.0/24 }
> BUG: invalid data expression type prefix
> nft: netlink.c:326: netlink_gen_data: Assertion `0' failed.

We should be showing a better error on this, so the user knows the set
was not defined to have intervals.

Anyway, even after the missing flags there on top, you'll hit another
EEXIST bug that we currently have in the kernel.

      reply	other threads:[~2015-09-22 22:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-22 18:41 [nft] strange behaviour littlesmilingcloud
2015-09-22 22:24 ` Pablo Neira Ayuso [this message]

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=20150922222454.GA4740@salvia \
    --to=pablo@netfilter.org \
    --cc=dau@sunlink.ru \
    --cc=littlesmilingcloud@gmail.com \
    --cc=netfilter-devel@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;
as well as URLs for NNTP newsgroup(s).