From 1ab1fcbc19a82e03d229586b8fd5b16396a9fab7 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Mon, 26 Jul 2021 16:29:58 +0200 Subject: parser_bison: parse number as reject icmp code Extend parser to accept a numeric icmp code, instead of bailing out: # nft add rule inet filter input reject with icmpx type 3 Error: syntax error, unexpected number, expecting string add rule inet filter input reject with icmpx type 3 ^ Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1555 Signed-off-by: Pablo Neira Ayuso --- tests/py/inet/reject.t | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/py/inet/reject.t') diff --git a/tests/py/inet/reject.t b/tests/py/inet/reject.t index a9ecd2ea..bae8fc2e 100644 --- a/tests/py/inet/reject.t +++ b/tests/py/inet/reject.t @@ -25,6 +25,7 @@ reject with icmpx type host-unreachable;ok reject with icmpx type no-route;ok reject with icmpx type admin-prohibited;ok reject with icmpx type port-unreachable;ok;reject +reject with icmpx type 3;ok;reject with icmpx type admin-prohibited meta nfproto ipv4 reject with icmp type host-unreachable;ok;reject with icmp type host-unreachable meta nfproto ipv6 reject with icmpv6 type no-route;ok;reject with icmpv6 type no-route -- cgit v1.2.3