]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: py: missing json update for numeric reject with icmp numeric
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 26 Jul 2021 22:32:04 +0000 (00:32 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 26 Jul 2021 22:49:32 +0000 (00:49 +0200)
Add missing tests to cover json support for reject with icmp numeric.

Fixes: 1ab1fcbc19a8 ("parser_bison: parse number as reject icmp code")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
tests/py/inet/reject.t.json
tests/py/ip/reject.t.json
tests/py/ip6/reject.t.json

index e60cd4f205f6913a72e3a308ba7610b383e465d2..76cd1bf579d2baab90da9f240eda5d61bce028b6 100644 (file)
     }
 ]
 
+# reject with icmpx 3
+[
+    {
+        "reject": {
+            "expr": "admin-prohibited",
+            "type": "icmpx"
+        }
+    }
+]
+
 # meta nfproto ipv4 reject with icmp host-unreachable
 [
     {
index c0d7791b916413fa6281ae0fb7caf8da7d985d71..3e1d28de153dd748028a53430cf99b316cd51cc6 100644 (file)
     }
 ]
 
+# reject with icmp 3
+[
+    {
+        "reject": {
+            "expr": "port-unreachable",
+            "type": "icmp"
+        }
+    }
+]
+
 # mark 0x80000000 reject with tcp reset
 [
     {
index 718d0ee5173f29eda732a2dc8511d5db9161f203..312a7dabbd938e2e891838fd1ec137791d805fbd 100644 (file)
     }
 ]
 
+# reject with icmpv6 3
+[
+    {
+        "reject": {
+            "expr": "addr-unreachable",
+            "type": "icmpv6"
+        }
+    }
+]
+
 # mark 0x80000000 reject with tcp reset
 [
     {