netfilter.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Alex Chapman <ajchapman88@hotmail.co.uk>
Cc: "netfilter@vger.kernel.org" <netfilter@vger.kernel.org>
Subject: Re: nftables multi-dimensional dictionaries
Date: Thu, 3 Sep 2015 18:35:25 +0200	[thread overview]
Message-ID: <20150903163519.GA14100@salvia> (raw)
In-Reply-To: <DUB109-W834148D76D2B04B8469D05E1690@phx.gbl>

On Wed, Sep 02, 2015 at 10:17:12AM +0100, Alex Chapman wrote:
> Hi,
> 
> Are multi-dimensional dictionaries supported in nftables? For example:
> 
> nft add rule ip filter forward meta iifname . meta oifname { \ eth0 . eth1 : jump chain \ }

Currently we don't support oifname and oifname, the utility complains
since it's a variable length datatype. But I think we can fix this by
using the maximum length.

Anyway, meanwhile you can use iif and oif for device whose device
index is not expected to change.

So this is how what you need looks like:

        nft add rule ip filter forward \
                meta iif . meta oif vmap { eth0 . eth1 : jump test-chain }

  reply	other threads:[~2015-09-03 16:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-02  9:17 nftables multi-dimensional dictionaries Alex Chapman
2015-09-03 16:35 ` Pablo Neira Ayuso [this message]
2015-09-04 13:32   ` Alex Chapman
2015-09-04 14:44     ` 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=20150903163519.GA14100@salvia \
    --to=pablo@netfilter.org \
    --cc=ajchapman88@hotmail.co.uk \
    --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;
as well as URLs for NNTP newsgroup(s).