diff options
author | Florian Westphal <fw@strlen.de> | 2023-06-19 22:43:04 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2023-06-20 21:46:13 +0200 |
commit | fa52bc22580632b4b78c263e338ddfbe235a8218 (patch) | |
tree | 92d543d323267f59ec2246d4e2d8b1cc1b6776d2 /tests/shell/testcases | |
parent | bb16416ec82599e41043a52887c37157e6f61984 (diff) |
parser: reject zero-length interface names
device "" results in an assertion during evaluation.
Before:
nft: expression.c:426: constant_expr_alloc: Assertion `(((len) + (8) - 1) / (8)) > 0' failed.
After:
zero_length_devicename_assert:3:42-49: Error: you cannot set an empty interface name
type filter hook ingress device""lo" priority -1
^^^^^^^^
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests/shell/testcases')
-rw-r--r-- | tests/shell/testcases/bogons/nft-f/zero_length_devicename_assert | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/shell/testcases/bogons/nft-f/zero_length_devicename_assert b/tests/shell/testcases/bogons/nft-f/zero_length_devicename_assert new file mode 100644 index 00000000..84f33073 --- /dev/null +++ b/tests/shell/testcases/bogons/nft-f/zero_length_devicename_assert @@ -0,0 +1,5 @@ +table ip x { + chain Main_Ingress1 { + type filter hook ingress device""lo" priority -1 + } +} |