From: michael-dev@fami-braun.de
To: netfilter-devel@vger.kernel.org
Cc: michael-dev@fami-braun.de, pablo@netfilter.org
Subject: [PATCH] tests: add json test for vlan rule fix
Date: Sun, 11 Aug 2019 12:16:03 +0200 [thread overview]
Message-ID: <20190811101603.2892-1-michael-dev@fami-braun.de> (raw)
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
next reply other threads:[~2019-08-11 10:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-11 10:16 michael-dev [this message]
2019-08-12 8:06 ` [PATCH] tests: add json test for vlan rule fix Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190811101603.2892-1-michael-dev@fami-braun.de \
--to=michael-dev@fami-braun.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).