All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Schultz <andreas.schultz@travelping.com>
To: netfilter <netfilter@vger.kernel.org>
Subject: parser problem in range map?
Date: Tue, 26 Jan 2021 16:02:20 +0100	[thread overview]
Message-ID: <CAC=ZbaS3H09px4EfJQx5gaWv9zthVxD3LQHjue9vfsjcfG_zOw@mail.gmail.com> (raw)

The following simple ruleset fails to load on nftables 0.9.8 (from
Ubuntu 21.04):

#!/usr/sbin/nft -f

flush ruleset

table inet nat {
    chain prerouting {
        type filter hook prerouting priority -100;
        ip daddr set numgen inc mod 16 map { 0 - 7 : 10.0.1.1, 8 - 15
: 10.0.1.2 }
    }

    chain postrouting {
        type filter hook postrouting priority 100;
    }
}

It throws this error:

# nft -f test.nft
test.nft:12:40-42: Error: Value 100 exceeds valid range 0-15
type filter hook postrouting priority 100;
                                      ^^^
test.nft:12:31-42: Error: invalid priority expression value in this context.
type filter hook postrouting priority 100;
                             ^^^^^^^^^^^^

Is there something wrong with my expression or is this a bug?

Regards,
Andreas

-- 
Andreas Schultz

             reply	other threads:[~2021-01-26 15:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-26 15:02 Andreas Schultz [this message]
2021-01-26 15:32 ` parser problem in range map? Florian Westphal

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='CAC=ZbaS3H09px4EfJQx5gaWv9zthVxD3LQHjue9vfsjcfG_zOw@mail.gmail.com' \
    --to=andreas.schultz@travelping.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.