*ip;test-ip;input
-flow table xyz { ip saddr timeout 30s counter packets 0 bytes 0};ok
+flow table xyz { ip saddr timeout 30s counter};ok
-# flow table xyz { ip saddr timeout 30s counter packets 0 bytes 0}
+# flow table xyz { ip saddr timeout 30s counter}
xyz test-ip 31
xyz test-ip 0
ip test-ip input
# masquerade with sets
tcp dport { 1,2,3,4,5,6,7,8,101,202,303,1001,2002,3003} masquerade;ok
-ip daddr 10.0.0.0-10.2.3.4 udp dport 53 counter packets 0 bytes 0 masquerade;ok
+ip daddr 10.0.0.0-10.2.3.4 udp dport 53 counter masquerade;ok
iifname eth0 ct state new,established tcp dport vmap {22 : drop, 222 : drop } masquerade;ok
[ lookup reg 1 set __set%d ]
[ masq ]
-# ip daddr 10.0.0.0-10.2.3.4 udp dport 53 counter packets 0 bytes 0 masquerade
+# ip daddr 10.0.0.0-10.2.3.4 udp dport 53 counter masquerade
ip test-ip4 postrouting
[ payload load 4b @ network header + 16 => reg 1 ]
[ cmp gte reg 1 0x0000000a ]
# redirect with sets
tcp dport { 1, 2, 3, 4, 5, 6, 7, 8, 101, 202, 303, 1001, 2002, 3003} redirect;ok
-ip daddr 10.0.0.0-10.2.3.4 udp dport 53 counter packets 0 bytes 0 redirect;ok
+ip daddr 10.0.0.0-10.2.3.4 udp dport 53 counter redirect;ok
iifname eth0 ct state new,established tcp dport vmap {22 : drop, 222 : drop } redirect;ok
# redirect with maps
[ lookup reg 1 set __set%d ]
[ redir ]
-# ip daddr 10.0.0.0-10.2.3.4 udp dport 53 counter packets 0 bytes 0 redirect
+# ip daddr 10.0.0.0-10.2.3.4 udp dport 53 counter redirect
ip test-ip4 output
[ payload load 4b @ network header + 16 => reg 1 ]
[ cmp gte reg 1 0x0000000a ]
*ip6;test-ip6;input
-flow table acct_out { meta iif . ip6 saddr timeout 600s counter };ok;flow table acct_out { iif . ip6 saddr timeout 10m counter packets 0 bytes 0}
-flow table acct_out { ip6 saddr . meta iif timeout 600s counter };ok;flow table acct_out { ip6 saddr . iif timeout 10m counter packets 0 bytes 0}
+flow table acct_out { meta iif . ip6 saddr timeout 600s counter };ok;flow table acct_out { iif . ip6 saddr timeout 10m counter}
+flow table acct_out { ip6 saddr . meta iif timeout 600s counter };ok;flow table acct_out { ip6 saddr . iif timeout 10m counter}
# masquerade with sets
tcp dport { 1,2,3,4,5,6,7,8,101,202,303,1001,2002,3003} masquerade;ok
-ip6 daddr fe00::1-fe00::200 udp dport 53 counter packets 0 bytes 0 masquerade;ok
+ip6 daddr fe00::1-fe00::200 udp dport 53 counter masquerade;ok
iifname eth0 ct state new,established tcp dport vmap {22 : drop, 222 : drop } masquerade;ok
[ lookup reg 1 set __set%d ]
[ masq ]
-# ip6 daddr fe00::1-fe00::200 udp dport 53 counter packets 0 bytes 0 masquerade
+# ip6 daddr fe00::1-fe00::200 udp dport 53 counter masquerade
ip6 test-ip6 postrouting
[ payload load 16b @ network header + 24 => reg 1 ]
[ cmp gte reg 1 0x000000fe 0x00000000 0x00000000 0x01000000 ]
# with no arguments
redirect;ok
udp dport 954 redirect;ok
-ip6 saddr fe00::cafe counter packets 0 bytes 0 redirect;ok
+ip6 saddr fe00::cafe counter redirect;ok
# nf_nat flags combination
udp dport 53 redirect random;ok
# redirect with sets
tcp dport { 1, 2, 3, 4, 5, 6, 7, 8, 101, 202, 303, 1001, 2002, 3003} redirect;ok
-ip6 daddr fe00::1-fe00::200 udp dport 53 counter packets 0 bytes 0 redirect;ok
+ip6 daddr fe00::1-fe00::200 udp dport 53 counter redirect;ok
iifname eth0 ct state new,established tcp dport vmap {22 : drop, 222 : drop } redirect;ok
# redirect with maps
[ cmp eq reg 1 0x0000ba03 ]
[ redir ]
-# ip6 saddr fe00::cafe counter packets 0 bytes 0 redirect
+# ip6 saddr fe00::cafe counter redirect
ip6 test-ip6 output
[ payload load 16b @ network header + 8 => reg 1 ]
[ cmp eq reg 1 0x000000fe 0x00000000 0x00000000 0xfeca0000 ]
[ lookup reg 1 set __set%d ]
[ redir ]
-# ip6 daddr fe00::1-fe00::200 udp dport 53 counter packets 0 bytes 0 redirect
+# ip6 daddr fe00::1-fe00::200 udp dport 53 counter redirect
ip6 test-ip6 output
[ payload load 16b @ network header + 24 => reg 1 ]
[ cmp gte reg 1 0x000000fe 0x00000000 0x00000000 0x01000000 ]
gotf.name, 1)
# Check output of nft
- process = subprocess.Popen([NFT_BIN, '-nnn', 'list', 'table',
+ process = subprocess.Popen([NFT_BIN, '-nnns', 'list', 'table',
table.family, table.name],
shell=False,
stdout=subprocess.PIPE,