summaryrefslogtreecommitdiffstats
path: root/tests/py/ip/ip.t.payload.netdev
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2021-06-11 18:51:08 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2021-06-11 19:55:46 +0200
commitbbcc5eda7e5880cf605ff470d5830dfae5da925b (patch)
tree2f76688c818ba40c1a6867f445d0a2dc498d186a /tests/py/ip/ip.t.payload.netdev
parentd2fba515ff94b4a8fb507ac8ca4c45ed25371c47 (diff)
evaluate: restore interval + concatenation in anonymous set
Perform the table and set lookup only for non-anonymous sets, where the incremental cache update is required. The problem fixed by 7aa08d45031e ("evaluate: Perform set evaluation on implicitly declared (anonymous) sets") resurrected after the cache rework. # nft add rule x y tcp sport . tcp dport vmap { ssh . 0-65535 : accept, 0-65535 . ssh : accept } BUG: invalid range expression type concat nft: expression.c:1422: range_expr_value_low: Assertion `0' failed. Abort Add a test case to make sure this does not happen again. Fixes: 5ec5c706d993 ("cache: add hashtable cache for table") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/py/ip/ip.t.payload.netdev')
-rw-r--r--tests/py/ip/ip.t.payload.netdev11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/py/ip/ip.t.payload.netdev b/tests/py/ip/ip.t.payload.netdev
index a4f56103..712cb375 100644
--- a/tests/py/ip/ip.t.payload.netdev
+++ b/tests/py/ip/ip.t.payload.netdev
@@ -662,3 +662,14 @@ netdev test-netdev ingress
[ bitwise reg 1 = ( reg 1 & 0x000000ff ) ^ 0x00000100 ]
[ payload write reg 1 => 2b @ network header + 8 csum_type 1 csum_off 10 csum_flags 0x1 ]
+# ip saddr . ip daddr { 192.0.2.1 . 10.0.0.1-10.0.0.2 }
+__set%d test-netdev 87 size 1
+__set%d test-netdev 0
+ element 010200c0 0100000a - 010200c0 0200000a : 0 [end]
+netdev
+ [ meta load protocol => reg 1 ]
+ [ cmp eq reg 1 0x00000008 ]
+ [ payload load 4b @ network header + 12 => reg 1 ]
+ [ payload load 4b @ network header + 16 => reg 9 ]
+ [ lookup reg 1 set __set%d ]
+