diff options
author | Elise Lennion <elise.lennion@gmail.com> | 2017-01-23 20:42:00 -0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-01-24 18:54:42 +0100 |
commit | 5c33d714b433a575aa40754da563842db7f1e774 (patch) | |
tree | c5277581fa9435f833304c451c8f3af11985103a /tests/shell/testcases | |
parent | 4189bae732efbf6234e8627e442d0f17a2a4e2b7 (diff) |
tests: shell: Add test for flush bug on sets with size
This tests for a bug where elements can't be added after flushing a
full set with the flag NFTNL_SET_DESC_SIZE set.
Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/shell/testcases')
-rwxr-xr-x | tests/shell/testcases/sets/0017add_after_flush_0 | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/shell/testcases/sets/0017add_after_flush_0 b/tests/shell/testcases/sets/0017add_after_flush_0 new file mode 100755 index 00000000..0390b035 --- /dev/null +++ b/tests/shell/testcases/sets/0017add_after_flush_0 @@ -0,0 +1,12 @@ +#!/bin/bash + +# This tests for a bug where elements can't be added after flushing a +# full set with the flag NFTNL_SET_DESC_SIZE set + +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.2} +$NFT flush set x s +$NFT add element x s {1.1.1.1} |