netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Chris Arges <carges@cloudflare.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: nft terse set listing issue: netlink: Error: Unknown set in lookup expression
Date: Thu, 28 Oct 2021 01:33:38 +0200	[thread overview]
Message-ID: <YXnh0q9fMXy9Gci2@salvia> (raw)
In-Reply-To: <7bfa71f4-ec0c-d74d-cba6-a456a45ed2c1@cloudflare.com>

Yes, that's a bug:

http://git.netfilter.org/nftables/commit/?id=9628d52e46ac7022512149e7f5d3aefa226bbe25

On Wed, Oct 27, 2021 at 05:03:44PM -0500, Chris Arges wrote:
-
Hi, I was wondering if it is possible to do terse listings of rulesets and
ensure that set names are also visible.

For example if I have the following example:

#!/usr/sbin/nft -f
table inet filter {
    set example {
        type ipv4_addr
        flags interval
        auto-merge
        elements = { 10.10.10.10, 10.10.11.11 }
    }

    chain input {
        type filter hook prerouting priority filter; policy accept;
        ip saddr @example drop
    }
}

if I do the listing in v1.0.0, I will see the following:

$ sudo nft -t list ruleset
table inet filter {
    set example {
        type ipv4_addr
        flags interval
        auto-merge
    }

    chain input {
        type filter hook prerouting priority filter; policy accept;
        ip saddr @example drop
    }
}

In the latest master I see the following:

$ sudo nft -t list ruleset
table inet filter {
        chain input {
                type filter hook prerouting priority filter; policy accept;
                meta nfproto ipv4 drop
        }
}
netlink: Error: Unknown set 'example' in lookup expression

The old behavior is nice in that the set name is present without the
contents of the set.

Thanks,

--chris


      reply	other threads:[~2021-10-27 23:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-27 22:03 nft terse set listing issue: netlink: Error: Unknown set in lookup expression Chris Arges
2021-10-27 23:33 ` 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=YXnh0q9fMXy9Gci2@salvia \
    --to=pablo@netfilter.org \
    --cc=carges@cloudflare.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).