diff options
author | Florian Westphal <fw@strlen.de> | 2021-06-14 15:01:41 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2021-06-14 15:03:41 +0200 |
commit | 643aed773228b9ad7abfbe1cadc164d7dbe7f6a8 (patch) | |
tree | 24325c3e0bd72556f91571a9aaf9219c4a72ce33 /tests | |
parent | 82a32a376c82fb7a1b9f10ec7146d1c36bb3cca5 (diff) |
json: tests: add missing concat test case
Fix
ERROR: did not find JSON equivalent for rule 'ip saddr . ip daddr { 192.0.2.1 . 10.0.0.1-10.0.0.2 }'
when running nft-test.py -j
Fixes: bbcc5eda7e58 ("evaluate: restore interval + concatenation in anonymous set")
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/py/ip/ip.t.json | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/py/ip/ip.t.json b/tests/py/ip/ip.t.json index 42f936c1..32312b15 100644 --- a/tests/py/ip/ip.t.json +++ b/tests/py/ip/ip.t.json @@ -1596,3 +1596,42 @@ } ] +# ip saddr . ip daddr { 192.0.2.1 . 10.0.0.1-10.0.0.2 } +[ + { + "match": { + "left": { + "concat": [ + { + "payload": { + "field": "saddr", + "protocol": "ip" + } + }, + { + "payload": { + "field": "daddr", + "protocol": "ip" + } + } + ] + }, + "op": "==", + "right": { + "set": [ + { + "concat": [ + "192.0.2.1", + { + "range": [ + "10.0.0.1", + "10.0.0.2" + ] + } + ] + } + ] + } + } + } +] |