From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Robert White <rwhite@pobox.com>
Cc: netfilter@vger.kernel.org
Subject: Re: BUG: nft cannot "list ruleset" with interval maps
Date: Wed, 8 Feb 2017 18:28:15 +0100 [thread overview]
Message-ID: <20170208172815.GA28759@salvia> (raw)
In-Reply-To: <f6c01a5c-33f4-0c90-96e1-8abf7777b4b8@pobox.com>
On Wed, Feb 08, 2017 at 05:00:18PM +0000, Robert White wrote:
> (please forgive stupid email word wrap)
>
> # nft table ip nat
> # nft map nat dnat_example { type inet_service: ipv4_addr\; flags interval
> \; }
> # nft element nat dnat_example { 3476-3480 : 192.168.14.12 }
> # nft list ruleset
> table ip nat {
> map dnat_example {
> type inet_service : ipv4_addr
> flags interval
> nft: mini-gmp.c:4311: mpz_export: Assertion `size > 0 || u->_mp_size == 0'
> failed.
> elements = { 3476-Aborted
>
> So the entry seems to have gotten in alright but it can't come back out
> normally. I can tell because a "export json" works
>
> # nft export json
> {"nftables":[{"table":{"name":"nat","family":"ip","flags":0,"use":1}},{"set":{"name":"dnat_example","table":"nat","flags":12,"family":"ip","key_type":13,"key_len":2,"data_type":7,"data_len":4,"set_elem":[{"flags":1,"key":{"reg":{"type":"value","len":2,"data0":"0x0000990d"}}},{"key":{"reg":{"type":"value","len":2,"data0":"0x0000940d"}},"data":{"reg":{"type":"value","len":4,"data0":"0x0c0ea8c0"}}},{"flags":1,"key":{"reg":{"type":"value","len":2,"data0":"0x00000000"}}}]}}]}
>
>
> NOTE: interval sets work fine:
>
> # nft list ruleset
> table ip nat {
> set portrange {
> type inet_service
> flags interval
> elements = { 3776-3780}
> }
> }
What nft version are you using? This works fine with nft git
snapshots. Please, give it a try and confirm.
Thanks.
next prev parent reply other threads:[~2017-02-08 17:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-08 17:00 BUG: nft cannot "list ruleset" with interval maps Robert White
2017-02-08 17:28 ` Pablo Neira Ayuso [this message]
2017-02-08 23:51 ` Robert White
2017-02-09 0:11 ` Robert White
2017-02-09 0:24 ` (whoops) " Robert White
2017-02-09 10:46 ` 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=20170208172815.GA28759@salvia \
--to=pablo@netfilter.org \
--cc=netfilter@vger.kernel.org \
--cc=rwhite@pobox.com \
/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