From af1a61c91cd7564a7c3fa685d408aa5b337d2c4b Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 27 Jul 2021 00:32:04 +0200 Subject: tests: py: missing json update for numeric reject with icmp numeric 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 --- tests/py/inet/reject.t.json | 10 ++++++++++ tests/py/ip/reject.t.json | 10 ++++++++++ tests/py/ip6/reject.t.json | 10 ++++++++++ 3 files changed, 30 insertions(+) (limited to 'tests') diff --git a/tests/py/inet/reject.t.json b/tests/py/inet/reject.t.json index e60cd4f2..76cd1bf5 100644 --- a/tests/py/inet/reject.t.json +++ b/tests/py/inet/reject.t.json @@ -205,6 +205,16 @@ } ] +# reject with icmpx 3 +[ + { + "reject": { + "expr": "admin-prohibited", + "type": "icmpx" + } + } +] + # meta nfproto ipv4 reject with icmp host-unreachable [ { diff --git a/tests/py/ip/reject.t.json b/tests/py/ip/reject.t.json index c0d7791b..3e1d28de 100644 --- a/tests/py/ip/reject.t.json +++ b/tests/py/ip/reject.t.json @@ -75,6 +75,16 @@ } ] +# reject with icmp 3 +[ + { + "reject": { + "expr": "port-unreachable", + "type": "icmp" + } + } +] + # mark 0x80000000 reject with tcp reset [ { diff --git a/tests/py/ip6/reject.t.json b/tests/py/ip6/reject.t.json index 718d0ee5..312a7dab 100644 --- a/tests/py/ip6/reject.t.json +++ b/tests/py/ip6/reject.t.json @@ -65,6 +65,16 @@ } ] +# reject with icmpv6 3 +[ + { + "reject": { + "expr": "addr-unreachable", + "type": "icmpv6" + } + } +] + # mark 0x80000000 reject with tcp reset [ { -- cgit v1.2.3