diff options
author | Florian Westphal <fw@strlen.de> | 2023-10-06 10:07:01 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2023-10-06 11:21:54 +0200 |
commit | 8b9ae77598b4d074cfa6dc263e6064d9bd5610d4 (patch) | |
tree | c50c465cd9a978505374b408c2e9d9f4270d6880 /tests/py | |
parent | 4a3dcbb44389edc5aba8dbc9317e8c6293263a66 (diff) |
tests: never merge across non-expression statements redux 2
Turns out I also love to forget about nft-test.py -j.
Fixes: 99ab1b8feb16 ("rule: never merge across non-expression statements")
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests/py')
-rw-r--r-- | tests/py/bridge/vlan.t.json | 34 | ||||
-rw-r--r-- | tests/py/ip/ip.t.json | 61 |
2 files changed, 95 insertions, 0 deletions
diff --git a/tests/py/bridge/vlan.t.json b/tests/py/bridge/vlan.t.json index f77756f5..7dfcdb4b 100644 --- a/tests/py/bridge/vlan.t.json +++ b/tests/py/bridge/vlan.t.json @@ -858,3 +858,37 @@ } } ] + +# ether saddr 00:11:22:33:44:55 counter ether type 8021q +[ + { + "match": { + "left": { + "payload": { + "field": "saddr", + "protocol": "ether" + } + }, + "op": "==", + "right": "00:11:22:33:44:55" + } + }, + { + "counter": { + "bytes": 0, + "packets": 0 + } + }, + { + "match": { + "left": { + "payload": { + "field": "type", + "protocol": "ether" + } + }, + "op": "==", + "right": "8021q" + } + } +] diff --git a/tests/py/ip/ip.t.json b/tests/py/ip/ip.t.json index 2f46ebcc..882c94eb 100644 --- a/tests/py/ip/ip.t.json +++ b/tests/py/ip/ip.t.json @@ -1748,3 +1748,64 @@ } ] +# ip saddr 1.2.3.4 ip daddr 3.4.5.6 +[ + { + "match": { + "left": { + "payload": { + "field": "saddr", + "protocol": "ip" + } + }, + "op": "==", + "right": "1.2.3.4" + } + }, + { + "match": { + "left": { + "payload": { + "field": "daddr", + "protocol": "ip" + } + }, + "op": "==", + "right": "3.4.5.6" + } + } +] + +# ip saddr 1.2.3.4 counter ip daddr 3.4.5.6 +[ + { + "match": { + "left": { + "payload": { + "field": "saddr", + "protocol": "ip" + } + }, + "op": "==", + "right": "1.2.3.4" + } + }, + { + "counter": { + "bytes": 0, + "packets": 0 + } + }, + { + "match": { + "left": { + "payload": { + "field": "daddr", + "protocol": "ip" + } + }, + "op": "==", + "right": "3.4.5.6" + } + } +] |