diff options
author | Arturo Borrero <arturo.borrero.glez@gmail.com> | 2016-04-14 09:58:56 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-04-15 12:39:05 +0200 |
commit | f9feca7d4029ed5af9e392cab3db93a5db0aa33f (patch) | |
tree | aa3e2f7903d88183be3dbba80a1e00cb2d428567 /tests/shell/testcases/rule_management/0006replace_1 | |
parent | 795d88cb710512d9b85afbb17beaeec3d92dcd54 (diff) |
tests/shell: add testcases for Netfilter bug #965
Testscases for Netfilter bug #965:
* add rule at position
* insert rule at position
* replace rule with given handle
* delete rule with given handle
* don't allow to delete rules with position keyword
Netfilter Bugzilla: http://bugzilla.netfilter.org/show_bug.cgi?id=965
Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/shell/testcases/rule_management/0006replace_1')
-rwxr-xr-x | tests/shell/testcases/rule_management/0006replace_1 | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/shell/testcases/rule_management/0006replace_1 b/tests/shell/testcases/rule_management/0006replace_1 new file mode 100755 index 00000000..5dfcba02 --- /dev/null +++ b/tests/shell/testcases/rule_management/0006replace_1 @@ -0,0 +1,11 @@ +#!/bin/bash + +# tests for Netfilter bug #965 and the related fix +# (regarding rule management with a given position/handle spec) + +set -e +$NFT add table t +$NFT add chain t c +# position keyword with replace action is not allowed, this should fail +$NFT replace rule t c position 2 drop 2>/dev/null +echo "E: allowed replace with position specification" >&2 |