summaryrefslogtreecommitdiffstats
path: root/tests/py
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2023-12-11 12:54:35 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2023-12-11 14:40:20 +0100
commit5fec559727ffd2c6c8958748beab782096385758 (patch)
tree27bcdfd124c6e3f040871ebf7039943de1335690 /tests/py
parent8d3de823b622136e1d05a6fed11ff2dc0e804f8a (diff)
tests: py: missing json output in meta.t with vlan mapping
Fix this warning due to missing coverage: tests/py/any/meta.t.json.got: WARNING: line 2: Wrote JSON equivalent for rule meta mark set vlan id map { 1 : 0x00000001, 4095 : 0x00004095 } ERROR: did not find JSON equivalent for rule 'meta mark set vlan id map @map1 Fixes: 8d3de823b622 ("evaluate: reset statement length context before evaluating statement") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/py')
-rw-r--r--tests/py/any/meta.t.json60
1 files changed, 60 insertions, 0 deletions
diff --git a/tests/py/any/meta.t.json b/tests/py/any/meta.t.json
index 4734bbf9..d50272de 100644
--- a/tests/py/any/meta.t.json
+++ b/tests/py/any/meta.t.json
@@ -2758,3 +2758,63 @@
"accept": null
}
]
+
+# meta mark set vlan id map { 1 : 0x00000001, 4095 : 0x00004095 }
+[
+ {
+ "mangle": {
+ "key": {
+ "meta": {
+ "key": "mark"
+ }
+ },
+ "value": {
+ "map": {
+ "data": {
+ "set": [
+ [
+ 1,
+ 1
+ ],
+ [
+ 4095,
+ 16533
+ ]
+ ]
+ },
+ "key": {
+ "payload": {
+ "field": "id",
+ "protocol": "vlan"
+ }
+ }
+ }
+ }
+ }
+ }
+]
+
+# meta mark set vlan id map @map1
+[
+ {
+ "mangle": {
+ "key": {
+ "meta": {
+ "key": "mark"
+ }
+ },
+ "value": {
+ "map": {
+ "data": "@map1",
+ "key": {
+ "payload": {
+ "field": "id",
+ "protocol": "vlan"
+ }
+ }
+ }
+ }
+ }
+ }
+]
+