[PATCH nft] tests: update to new syntax to add/update set from packet path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Reported-by: Florian Westphal <fw@xxxxxxxxx>
Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
---
 tests/py/ip/sets.t                          | 2 +-
 tests/py/ip/sets.t.payload.inet             | 2 +-
 tests/py/ip/sets.t.payload.ip               | 2 +-
 tests/py/ip/sets.t.payload.netdev           | 2 +-
 tests/py/ip6/sets.t                         | 2 +-
 tests/py/ip6/sets.t.payload.inet            | 2 +-
 tests/py/ip6/sets.t.payload.ip6             | 2 +-
 tests/py/ip6/sets.t.payload.netdev          | 2 +-
 tests/shell/testcases/sets/0028autoselect_0 | 6 +++---
 9 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/tests/py/ip/sets.t b/tests/py/ip/sets.t
index b159ad8d98cc..658579aa499b 100644
--- a/tests/py/ip/sets.t
+++ b/tests/py/ip/sets.t
@@ -49,7 +49,7 @@ ip saddr != @set33 drop;fail
 
 !set5 type ipv4_addr . ipv4_addr;ok
 ip saddr . ip daddr @set5 drop;ok
-set add ip saddr . ip daddr @set5;ok
+add @set5 { ip saddr . ip daddr };ok
 
 # test nested anonymous sets
 ip saddr { { 1.1.1.0, 3.3.3.0 }, 2.2.2.0 };ok;ip saddr { 1.1.1.0, 2.2.2.0, 3.3.3.0 }
diff --git a/tests/py/ip/sets.t.payload.inet b/tests/py/ip/sets.t.payload.inet
index 136db564a186..fa956c0cdd44 100644
--- a/tests/py/ip/sets.t.payload.inet
+++ b/tests/py/ip/sets.t.payload.inet
@@ -39,7 +39,7 @@ inet test-inet input
   [ lookup reg 1 set set5 ]
   [ immediate reg 0 drop ]
 
-# set add ip saddr . ip daddr @set5
+# add @set5 { ip saddr . ip daddr }
 inet test-inet input
   [ meta load nfproto => reg 1 ]
   [ cmp eq reg 1 0x00000002 ]
diff --git a/tests/py/ip/sets.t.payload.ip b/tests/py/ip/sets.t.payload.ip
index a78317455bec..ca3b5adea3ab 100644
--- a/tests/py/ip/sets.t.payload.ip
+++ b/tests/py/ip/sets.t.payload.ip
@@ -29,7 +29,7 @@ ip test-ip4 input
   [ lookup reg 1 set set5 ]
   [ immediate reg 0 drop ]
 
-# set add ip saddr . ip daddr @set5
+# add @set5 { ip saddr . ip daddr }
 ip test-ip4 input
   [ payload load 4b @ network header + 12 => reg 1 ]
   [ payload load 4b @ network header + 16 => reg 9 ]
diff --git a/tests/py/ip/sets.t.payload.netdev b/tests/py/ip/sets.t.payload.netdev
index 16893007ec85..9772d756747d 100644
--- a/tests/py/ip/sets.t.payload.netdev
+++ b/tests/py/ip/sets.t.payload.netdev
@@ -39,7 +39,7 @@ netdev test-netdev ingress
   [ lookup reg 1 set set5 ]
   [ immediate reg 0 drop ]
 
-# set add ip saddr . ip daddr @set5
+# add @set5 { ip saddr . ip daddr }
 netdev test-netdev ingress
   [ meta load protocol => reg 1 ]
   [ cmp eq reg 1 0x00000008 ]
diff --git a/tests/py/ip6/sets.t b/tests/py/ip6/sets.t
index 54aa1e4b80bb..d5bcf74d38c1 100644
--- a/tests/py/ip6/sets.t
+++ b/tests/py/ip6/sets.t
@@ -39,4 +39,4 @@ ip6 saddr != @set33 drop;fail
 
 !set5 type ipv6_addr . ipv6_addr;ok
 ip6 saddr . ip6 daddr @set5 drop;ok
-set add ip6 saddr . ip6 daddr @set5;ok
+add @set5 { ip6 saddr . ip6 daddr };ok
diff --git a/tests/py/ip6/sets.t.payload.inet b/tests/py/ip6/sets.t.payload.inet
index cc6f9ef7fa95..3886db67526c 100644
--- a/tests/py/ip6/sets.t.payload.inet
+++ b/tests/py/ip6/sets.t.payload.inet
@@ -23,7 +23,7 @@ inet test-inet input
   [ lookup reg 1 set set5 ]
   [ immediate reg 0 drop ]
 
-# set add ip6 saddr . ip6 daddr @set5
+# add @set5 { ip6 saddr . ip6 daddr }
 inet test-inet input
   [ meta load nfproto => reg 1 ]
   [ cmp eq reg 1 0x0000000a ]
diff --git a/tests/py/ip6/sets.t.payload.ip6 b/tests/py/ip6/sets.t.payload.ip6
index f55da6ec28d7..0b318f8de97f 100644
--- a/tests/py/ip6/sets.t.payload.ip6
+++ b/tests/py/ip6/sets.t.payload.ip6
@@ -17,7 +17,7 @@ ip6 test-ip6 input
   [ lookup reg 1 set set5 ]
   [ immediate reg 0 drop ]
 
-# set add ip6 saddr . ip6 daddr @set5
+# add @set5 { ip6 saddr . ip6 daddr }
 ip6 test-ip6 input
   [ payload load 16b @ network header + 8 => reg 1 ]
   [ payload load 16b @ network header + 24 => reg 2 ]
diff --git a/tests/py/ip6/sets.t.payload.netdev b/tests/py/ip6/sets.t.payload.netdev
index 16b850c835ff..0dfabb778a0c 100644
--- a/tests/py/ip6/sets.t.payload.netdev
+++ b/tests/py/ip6/sets.t.payload.netdev
@@ -23,7 +23,7 @@ netdev test-netdev ingress
   [ lookup reg 1 set set5 ]
   [ immediate reg 0 drop ]
 
-# set add ip6 saddr . ip6 daddr @set5
+# add @set5 { ip6 saddr . ip6 daddr }
 netdev test-netdev ingress
   [ meta load protocol => reg 1 ]
   [ cmp eq reg 1 0x0000dd86 ]
diff --git a/tests/shell/testcases/sets/0028autoselect_0 b/tests/shell/testcases/sets/0028autoselect_0
index fdda832be385..711743378e85 100755
--- a/tests/shell/testcases/sets/0028autoselect_0
+++ b/tests/shell/testcases/sets/0028autoselect_0
@@ -12,6 +12,6 @@ $NFT add set t s2 { type ipv4_addr \; }
 $NFT add set t s3 { type ipv4_addr \; size 1024\; }
 $NFT add chain t c {type filter hook input priority 0 \; }
 
-$NFT add rule t c meta iifname foobar set add ip protocol @s1
-$NFT add rule t c meta iifname foobar set add ip daddr @s2
-$NFT add rule t c meta iifname foobar set add ip daddr @s3
+$NFT add rule t c meta iifname foobar add @s1 { ip protocol }
+$NFT add rule t c meta iifname foobar add @s2 { ip daddr }
+$NFT add rule t c meta iifname foobar add @s3 { ip daddr }
-- 
2.11.0


--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux