Linux Netfilter discussions
 help / color / mirror / Atom feed
* nftables: Intervals inside of maps?
@ 2016-09-15 12:13 Andreas Hainke
  2016-09-19 15:00 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Hainke @ 2016-09-15 12:13 UTC (permalink / raw)
  To: netfilter


[-- Attachment #1.1: Type: text/plain, Size: 1531 bytes --]

Hello,

does anybody know if it's possible to use intervals inside of maps?
Pablo already pointed out that it is possible to use maps as follows to
handle rule processing more efficient:

nft add rule test myChain ip saddr . ip daddr vmap { 10.10.10.15 .
10.10.20.5 : accept, 10.10.10.1 . 10.10.20.1 : accept}

table ip test {
    chain myChain {
        ip saddr . ip daddr vmap { 10.10.10.15 . 10.10.20.5 : accept,
10.10.10.1 . 10.10.20.1 : accept}
    }
}



If I try to use intervals in maps the same way, I receive the following
output:

root@fw:~# nft add rule test myChain ip saddr . ip daddr vmap {
10.10.10.0/24 . 10.10.20.0/24 : accept }
<cmdline>:1:64-64: Error: syntax error, unexpected ., expecting colon
add rule test myChain ip saddr . ip daddr vmap { 10.10.10.0/24 .
10.10.20.0/24 : accept }
                                      
                                                              ^


I also tried to add a map using the flag interval which will be
converted into a set without a verdict like this:

root@fw:~# nft list ruleset
table ip test {
    chain myChain {
    }
}
root@fw:~# nft add map test myMap { type ipv4_addr . ipv4_addr : verdict
\; flags interval \; }
root@fw:~# nft list ruleset
table ip test {
    set myMap {
        type ipv4_addr . ipv4_addr
        flags interval
    }

    chain myChain {
    }
}
root@fw:~#


So I guess using intervals inside of maps is currently not supported, is
this correct?

Kind regards
Andreas


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-09-19 15:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-15 12:13 nftables: Intervals inside of maps? Andreas Hainke
2016-09-19 15:00 ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox