diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2022-06-23 14:20:17 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2022-06-23 20:08:11 +0200 |
commit | 5357cb7b5cb93fc9b20d4d95b093d6b9f86b7727 (patch) | |
tree | 8606656d2350909b9a116a3f04a3c354ef3abe59 /tests/shell | |
parent | d54510f8c77d751d27b126e41251db738a2a4e0f (diff) |
intervals: fix crash when trying to remove element in empty set
The set deletion routine expects an initialized set, otherwise it crashes.
Fixes: 3e8d934e4f72 ("intervals: support to partial deletion with automerge")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/shell')
-rwxr-xr-x | tests/shell/testcases/sets/errors_0 | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/shell/testcases/sets/errors_0 b/tests/shell/testcases/sets/errors_0 new file mode 100755 index 00000000..2960b694 --- /dev/null +++ b/tests/shell/testcases/sets/errors_0 @@ -0,0 +1,14 @@ +#!/bin/bash + +set -e + +RULESET="table ip x { + set y { + type ipv4_addr + flags interval + } +} + +delete element ip x y { 2.3.4.5 }" + +$NFT -f - <<< $RULESET || exit 0 |