From: M. Braun Date: Sun, 11 Aug 2019 10:16:03 +0000 (+0200) Subject: tests: add json test for vlan rule fix X-Git-Tag: v0.9.2~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c9bd0aa99876ca6a6d24f6c135d732c3ad69fdc0;p=thirdparty%2Fnftables.git tests: add json test for vlan rule fix This fixes ERROR: did not find JSON equivalent for rule 'ether type vlan ip protocol 1 accept' when running ./nft-test.py -j bridge/vlan.t Reported-by: Pablo Neira Ayuso Signed-off-by: Michael Braun Signed-off-by: Pablo Neira Ayuso --- diff --git a/tests/py/bridge/vlan.t.json b/tests/py/bridge/vlan.t.json index 1a654640..3fb2e4f7 100644 --- a/tests/py/bridge/vlan.t.json +++ b/tests/py/bridge/vlan.t.json @@ -499,3 +499,34 @@ } ] +# ether type vlan ip protocol 1 accept +[ + { + "match": { + "left": { + "payload": { + "field": "type", + "protocol": "ether" + } + }, + "op": "==", + "right": "vlan" + } + }, + { + "match": { + "left": { + "payload": { + "field": "protocol", + "protocol": "ip" + } + }, + "op": "==", + "right": "icmp" + } + }, + { + "accept": null + } +] + diff --git a/tests/py/bridge/vlan.t.json.output b/tests/py/bridge/vlan.t.json.output new file mode 100644 index 00000000..8f27ec0e --- /dev/null +++ b/tests/py/bridge/vlan.t.json.output @@ -0,0 +1,31 @@ +# ether type vlan ip protocol 1 accept +[ + { + "match": { + "left": { + "payload": { + "field": "type", + "protocol": "ether" + } + }, + "op": "==", + "right": "vlan" + } + }, + { + "match": { + "left": { + "payload": { + "field": "protocol", + "protocol": "ip" + } + }, + "op": "==", + "right": 1 + } + }, + { + "accept": null + } +] +