This tests for a bug where a repeated element is added and the set elements counter is incorrectly increased. Signed-off-by: Elise Lennion <elise.lennion@xxxxxxxxx> --- tests/shell/testcases/sets/0016element_leak_0 | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 tests/shell/testcases/sets/0016element_leak_0 diff --git a/tests/shell/testcases/sets/0016element_leak_0 b/tests/shell/testcases/sets/0016element_leak_0 new file mode 100755 index 0000000..5675db3 --- /dev/null +++ b/tests/shell/testcases/sets/0016element_leak_0 @@ -0,0 +1,11 @@ +#!/bin/bash + +# This tests for a bug where a repeated element is added and the set +# elements counter is incorrectly increased. + +set -e +$NFT add table x +$NFT add set x s {type ipv4_addr\; size 2\;} +$NFT add element x s {1.1.1.1} +$NFT add element x s {1.1.1.1} +$NFT add element x s {1.1.1.1} -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html