All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Chapman <ajchapman88@hotmail.co.uk>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: "netfilter@vger.kernel.org" <netfilter@vger.kernel.org>
Subject: RE: nftables multi-dimensional dictionaries
Date: Fri, 4 Sep 2015 14:32:31 +0100	[thread overview]
Message-ID: <DUB109-W37CC9580BFB40296703618E1570@phx.gbl> (raw)
In-Reply-To: <20150903163519.GA14100@salvia>

Hi Pablo,

Thanks for the response. Do I need kernel 4.2 to support this? I'm on 4.1 currently and the command below is erroring:

# nft add rule ip firewall forward  meta iif . meta oif vmap { eth0 . lo : jump test }
<cmdline>:1:55-79: Error: Could not process rule: Invalid argument
add rule ip firewall forward meta iif . meta oif vmap { eth0 . lo : jump test }
                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^
<cmdline>:1:55-79: Error: Could not process rule: No such file or directory
add rule ip firewall forward meta iif . meta oif vmap { eth0 . lo : jump test }
                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^
<cmdline>:1:1-79: Error: Could not process rule: No such file or directory
add rule ip firewall forward meta iif . meta oif vmap { eth0 . lo : jump test }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

(table named firewall and both 'forward' and 'test' chains configured). 

----------------------------------------
> Date: Thu, 3 Sep 2015 18:35:25 +0200
> From: pablo@netfilter.org
> To: ajchapman88@hotmail.co.uk
> CC: netfilter@vger.kernel.org
> Subject: Re: nftables multi-dimensional dictionaries
>
> 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-04 13:32 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
2015-09-04 13:32   ` Alex Chapman [this message]
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=DUB109-W37CC9580BFB40296703618E1570@phx.gbl \
    --to=ajchapman88@hotmail.co.uk \
    --cc=netfilter@vger.kernel.org \
    --cc=pablo@netfilter.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.