diff options
author | Harsha Sharma <harshasharmaiitr@gmail.com> | 2018-01-24 05:16:01 +0530 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-01-25 20:50:55 +0100 |
commit | 0c9a946f51880a7163230cc1929ee4392c6a817f (patch) | |
tree | 829230e82850a83618511b0bdf3bb5a9a7d7636f /tests/shell | |
parent | 6312c4afd405e6a318b9ca87336b96880e39ab2a (diff) |
tests: shell: fetch rule handle with '-a' option and then delete rule
Fetch rule handle and then delete rule via that rule handle.
Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/shell')
-rwxr-xr-x | tests/shell/testcases/cache/0001_cache_handling_0 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/shell/testcases/cache/0001_cache_handling_0 b/tests/shell/testcases/cache/0001_cache_handling_0 index 9a737695..3693f15a 100755 --- a/tests/shell/testcases/cache/0001_cache_handling_0 +++ b/tests/shell/testcases/cache/0001_cache_handling_0 @@ -24,6 +24,7 @@ table inet test { set -e $NFT -f $tmpfile -$NFT delete rule inet test test handle 2 +rule_handle=$($NFT list ruleset -a | awk '/saddr/{print $NF}') +$NFT delete rule inet test test handle $rule_handle $NFT delete set inet test test $NFT -f $tmpfile |