summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorM. Braun <michael-dev@fami-braun.de>2019-08-11 12:16:03 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2019-08-12 10:04:13 +0200
commitc9bd0aa99876ca6a6d24f6c135d732c3ad69fdc0 (patch)
tree64cf607f445a98fee826e37112459acec3839cd8
parenta484624e5adcc6bf363d15744a3490fb31f16122 (diff)
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 <pablo@netfilter.org> Signed-off-by: Michael Braun <michael-dev@fami-braun.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--tests/py/bridge/vlan.t.json31
-rw-r--r--tests/py/bridge/vlan.t.json.output31
2 files changed, 62 insertions, 0 deletions
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
+ }
+]
+