diff options
author | Elise Lennion <elise.lennion@gmail.com> | 2017-01-19 14:29:47 -0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-01-23 14:24:40 +0100 |
commit | f7a68589c0b3bf2085c9066d99d6ee680c6e6751 (patch) | |
tree | 066a0536d91d234538ba2f253e91edc3084aa4f1 /tests/shell | |
parent | 7c038cca4276d9761d63f148b382488a83f4b1ad (diff) |
tests: shell: Add test for set element leak bug
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@gmail.com>
Diffstat (limited to 'tests/shell')
-rwxr-xr-x | tests/shell/testcases/sets/0016element_leak_0 | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/shell/testcases/sets/0016element_leak_0 b/tests/shell/testcases/sets/0016element_leak_0 new file mode 100755 index 00000000..5675db31 --- /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} |