Linux Netfilter discussions
 help / color / mirror / Atom feed
* nftables map with numgen type, not sure if it was implemented?
@ 2020-08-27 15:34 Eliezer Croitor
  2020-08-31 15:25 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 3+ messages in thread
From: Eliezer Croitor @ 2020-08-27 15:34 UTC (permalink / raw)
  To: netfilter

I was reading the at Netfilter-devel:
https://lore.kernel.org/netfilter-devel/20191204223215.GX14469@orbyte.nwl.cc
/T/#mbbcfec07dc54754144aa06cd7bb098b66d9d1da6

and have seen the command:
nft add map t m2 '{ type typeof numgen random mod 2 : verdict; }'

which is something that might be able to help me.
I am trying this on Alpine linux latest stable and I receive an error:

b-r4:/tmp# nft -nnn list ruleset
table ip dummyTable {
        chain dummyChain {
                type nat hook input priority 0; policy accept;
                ct state 0x2 accept
        }
}
table netdev nftlb {
        chain ingress-eth0 {
                type filter hook ingress device "eth0" priority 100; policy
accept;
                ip daddr 192.168.112.100 ip protocol 17 counter packets 0
bytes 0 jhash ip saddr . udp sport . ip daddr . udp dport mod 2 vmap { 0 :
jump Node1, 1 : jump Node2 }
                ip daddr 192.168.112.100 ip protocol 6 counter packets 126
bytes 8504 jhash ip saddr . tcp sport . ip daddr . tcp dport mod 2 vmap { 0
: jump Node1, 1 : jump Node2 }
        }

        chain Node1 {
                counter packets 66 bytes 4448 ether saddr set
00:15:5d:89:c6:eb ether daddr set 00:15:5d:89:c6:e3 ether type 0x0800 fwd to
"eth0"
        }

        chain Node2 {
                counter packets 60 bytes 4056 ether saddr set
00:15:5d:89:c6:eb ether daddr set 00:15:5d:89:c6:f4 ether type 0x0800 fwd to
"eth0"
        }
}
lb-r4:/tmp# nft add map nftlb m2 '{ type typeof numgen random mod 2 :
verdict; }'
Error: syntax error, unexpected typeof
add map nftlb m2 { type typeof numgen random mod 2 : verdict; }
                        ^^^^^^
Error: No such file or directory; did you mean table 'nftlb' in family
netdev?
add map nftlb m2 { type typeof numgen random mod 2 : verdict; }
        ^^^^^
lb-r4:/tmp#


Am I right for even trying it?

Thanks,
Eliezer


----
Eliezer Croitoru
Tech Support
Mobile: +972-5-28704261
Email: ngtech1ltd@gmail.com



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

end of thread, other threads:[~2020-09-24 19:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-27 15:34 nftables map with numgen type, not sure if it was implemented? Eliezer Croitor
2020-08-31 15:25 ` Pablo Neira Ayuso
2020-09-24 19:09   ` Eliezer Croitor

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