Deleting item from concatenated set stops working at least in 5.15.64. Add test to cover this use case. Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1638 Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> --- tests/shell/testcases/sets/concat_interval_0 | 18 ++++++++++++++++++ .../testcases/sets/dumps/concat_interval_0.nft | 7 +++++++ 2 files changed, 25 insertions(+) create mode 100755 tests/shell/testcases/sets/concat_interval_0 create mode 100644 tests/shell/testcases/sets/dumps/concat_interval_0.nft diff --git a/tests/shell/testcases/sets/concat_interval_0 b/tests/shell/testcases/sets/concat_interval_0 new file mode 100755 index 000000000000..3812a94d18c8 --- /dev/null +++ b/tests/shell/testcases/sets/concat_interval_0 @@ -0,0 +1,18 @@ +#!/bin/bash + +set -e + +RULESET="table ip t { + set s { + type ipv4_addr . inet_proto . inet_service + flags interval + counter + elements = { 1.0.0.1 . udp . 53 } + } +}" + +$NFT -f - <<< $RULESET + +$NFT delete element t s { 1.0.0.1 . udp . 53} + +exit 0 diff --git a/tests/shell/testcases/sets/dumps/concat_interval_0.nft b/tests/shell/testcases/sets/dumps/concat_interval_0.nft new file mode 100644 index 000000000000..875ec1d5c6a0 --- /dev/null +++ b/tests/shell/testcases/sets/dumps/concat_interval_0.nft @@ -0,0 +1,7 @@ +table ip t { + set s { + type ipv4_addr . inet_proto . inet_service + flags interval + counter + } +} -- 2.30.2