]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: py: missing json for different byteorder selector with interval concatenation
authorPablo Neira Ayuso <pablo@netfilter.org>
Wed, 7 Dec 2022 21:15:12 +0000 (22:15 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 8 Dec 2022 01:49:21 +0000 (02:49 +0100)
Add missing json output, otherwise -j reports an error.

Fixes: 1017d323cafa ("src: support for selectors with different byteorder with interval concatenations")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
tests/py/inet/meta.t.json

index 723a36f74946e6cbed8db1ec90a850c1a1924ea1..bc268a2ef2aec1820c6d757271447ba211915944 100644 (file)
         }
     }
 ]
+
+# meta mark . tcp dport { 0x0000000a-0x00000014 . 80-90, 0x00100000-0x00100123 . 100-120 }
+[
+    {
+        "match": {
+            "left": {
+                "concat": [
+                    {
+                        "meta": {
+                            "key": "mark"
+                        }
+                    },
+                    {
+                        "payload": {
+                            "field": "dport",
+                            "protocol": "tcp"
+                        }
+                    }
+                ]
+            },
+            "op": "==",
+            "right": {
+                "set": [
+                    {
+                        "concat": [
+                            {
+                                "range": [
+                                    10,
+                                    20
+                                ]
+                            },
+                            {
+                                "range": [
+                                    80,
+                                    90
+                                ]
+                            }
+                        ]
+                    },
+                    {
+                        "concat": [
+                            {
+                                "range": [
+                                    1048576,
+                                    1048867
+                                ]
+                            },
+                            {
+                                "range": [
+                                    100,
+                                    120
+                                ]
+                            }
+                        ]
+                    }
+                ]
+            }
+        }
+    }
+]
+