]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: py: update netdev reject test file
authorFlorian Westphal <fw@strlen.de>
Wed, 2 Jun 2021 18:47:34 +0000 (20:47 +0200)
committerFlorian Westphal <fw@strlen.de>
Fri, 4 Jun 2021 11:23:00 +0000 (13:23 +0200)
netdev/reject.t throws a couple of WARNINGs. For some reason this file
wasn't updated after the reject statement json output was changed to
keep the icmp type/protocol.

Signed-off-by: Florian Westphal <fw@strlen.de>
tests/py/netdev/reject.t.json

index 21e6ebb5117b71f85c6ac8089e4b3ca39d8232b6..616a2bc1cb6443c520ced54e0306fbcead35e8cd 100644 (file)
 
 # mark 12345 reject with tcp reset
 [
+    {
+        "match": {
+            "left": {
+                "meta": {
+                    "key": "l4proto"
+                }
+            },
+            "op": "==",
+            "right": 6
+        }
+    },
     {
         "match": {
             "left": {
 # reject
 [
     {
-        "reject": null
+        "reject": {
+            "expr": "port-unreachable",
+            "type": "icmpx"
+        }
     }
 ]
 
 # meta protocol ip reject
 [
     {
-        "match": {
-            "left": {
-                "meta": {
-                    "key": "protocol"
-                }
-            },
-            "op": "==",
-            "right": "ip"
+        "reject": {
+            "expr": "port-unreachable",
+            "type": "icmp"
         }
-    },
-    {
-        "reject": null
     }
 ]
 
 # meta protocol ip6 reject
 [
     {
-        "match": {
-            "left": {
-                "meta": {
-                    "key": "protocol"
-                }
-            },
-            "op": "==",
-            "right": "ip6"
+        "reject": {
+            "expr": "port-unreachable",
+            "type": "icmpv6"
         }
-    },
-    {
-        "reject": null
     }
 ]
 
 
 # meta protocol ip reject with icmp type host-unreachable
 [
-    {
-        "match": {
-            "left": {
-                "meta": {
-                    "key": "protocol"
-                }
-            },
-            "op": "==",
-            "right": "ip"
-        }
-    },
     {
         "reject": {
             "expr": "host-unreachable",
 
 # meta protocol ip6 reject with icmpv6 type no-route
 [
-    {
-        "match": {
-            "left": {
-                "meta": {
-                    "key": "protocol"
-                }
-            },
-            "op": "==",
-            "right": "ip6"
-        }
-    },
     {
         "reject": {
             "expr": "no-route",