Netfilter-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] tests: add json test for vlan rule fix
@ 2019-08-11 10:16 michael-dev
  2019-08-12  8:06 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: michael-dev @ 2019-08-11 10:16 UTC (permalink / raw)
  To: netfilter-devel; +Cc: michael-dev, pablo

From: "M. Braun" <michael-dev@fami-braun.de>

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@netfilter.org
Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
---
 tests/py/bridge/vlan.t.json        | 31 ++++++++++++++++++++++++++++++
 tests/py/bridge/vlan.t.json.output | 31 ++++++++++++++++++++++++++++++
 2 files changed, 62 insertions(+)
 create mode 100644 tests/py/bridge/vlan.t.json.output

diff --git a/tests/py/bridge/vlan.t.json b/tests/py/bridge/vlan.t.json
index 1a65464..3fb2e4f 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 0000000..8f27ec0
--- /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
+    }
+]
+
-- 
2.20.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] tests: add json test for vlan rule fix
  2019-08-11 10:16 [PATCH] tests: add json test for vlan rule fix michael-dev
@ 2019-08-12  8:06 ` Pablo Neira Ayuso
  0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2019-08-12  8:06 UTC (permalink / raw)
  To: michael-dev; +Cc: netfilter-devel

On Sun, Aug 11, 2019 at 12:16:03PM +0200, michael-dev@fami-braun.de wrote:
> From: "M. Braun" <michael-dev@fami-braun.de>
> 
> 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

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-11 10:16 [PATCH] tests: add json test for vlan rule fix michael-dev
2019-08-12  8:06 ` Pablo Neira Ayuso

Netfilter-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/netfilter-devel/0 netfilter-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netfilter-devel netfilter-devel/ https://lore.kernel.org/netfilter-devel \
		netfilter-devel@vger.kernel.org netfilter-devel@archiver.kernel.org
	public-inbox-index netfilter-devel


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netfilter-devel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox