summaryrefslogtreecommitdiffstats
path: root/tests/py/ip/reject.t.payload
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2021-07-26 16:29:58 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2021-07-26 16:56:24 +0200
commit1ab1fcbc19a82e03d229586b8fd5b16396a9fab7 (patch)
tree4987baa0e086ad12440e135fae685cf60e2b6706 /tests/py/ip/reject.t.payload
parentb41418e247998e134ec872d1557daa38bcdbc6c7 (diff)
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 <pablo@netfilter.org>
Diffstat (limited to 'tests/py/ip/reject.t.payload')
-rw-r--r--tests/py/ip/reject.t.payload4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/py/ip/reject.t.payload b/tests/py/ip/reject.t.payload
index 07e4cc8d..80fc5042 100644
--- a/tests/py/ip/reject.t.payload
+++ b/tests/py/ip/reject.t.payload
@@ -30,6 +30,10 @@ ip test-ip4 output
ip test-ip4 output
[ reject type 0 code 13 ]
+# reject with icmp type 3
+ip test-ip4 output
+ [ reject type 0 code 3 ]
+
# mark 0x80000000 reject with tcp reset
ip test-ip4 output
[ meta load l4proto => reg 1 ]