All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH nft] tests: py: update netdev reject test file
@ 2021-06-02 18:47 Florian Westphal
  0 siblings, 0 replies; only message in thread
From: Florian Westphal @ 2021-06-02 18:47 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Florian Westphal

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 | 66 +++++++++++------------------------
 1 file changed, 21 insertions(+), 45 deletions(-)

diff --git a/tests/py/netdev/reject.t.json b/tests/py/netdev/reject.t.json
index 21e6ebb5117b..616a2bc1cb64 100644
--- a/tests/py/netdev/reject.t.json
+++ b/tests/py/netdev/reject.t.json
@@ -130,6 +130,17 @@
 
 # mark 12345 reject with tcp reset
 [
+    {
+        "match": {
+            "left": {
+                "meta": {
+                    "key": "l4proto"
+                }
+            },
+            "op": "==",
+            "right": 6
+        }
+    },
     {
         "match": {
             "left": {
@@ -151,43 +162,30 @@
 # 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
     }
 ]
 
@@ -233,17 +231,6 @@
 
 # meta protocol ip reject with icmp type host-unreachable
 [
-    {
-        "match": {
-            "left": {
-                "meta": {
-                    "key": "protocol"
-                }
-            },
-            "op": "==",
-            "right": "ip"
-        }
-    },
     {
         "reject": {
             "expr": "host-unreachable",
@@ -254,17 +241,6 @@
 
 # meta protocol ip6 reject with icmpv6 type no-route
 [
-    {
-        "match": {
-            "left": {
-                "meta": {
-                    "key": "protocol"
-                }
-            },
-            "op": "==",
-            "right": "ip6"
-        }
-    },
     {
         "reject": {
             "expr": "no-route",
-- 
2.31.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-02 18:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-02 18:47 [PATCH nft] tests: py: update netdev reject test file Florian Westphal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.