summaryrefslogtreecommitdiffstats
path: root/iptables/tests
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2018-11-12 14:29:47 +0100
committerFlorian Westphal <fw@strlen.de>2018-11-12 14:34:13 +0100
commit85d7df90ed505d8de7ff27cc5106492049756f4e (patch)
treec7dbba1d2ab7d1d125a8c4d5952e40c661155004 /iptables/tests
parent3ccb443df988fd1d476de55d6ad1f69919d936af (diff)
xtables: Fix error return code in nft_chain_user_rename()
If the chain to rename wasn't found, the function would return -1 which got interpreted as success. Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'iptables/tests')
-rwxr-xr-xiptables/tests/shell/testcases/iptables/0004-return-codes_04
1 files changed, 4 insertions, 0 deletions
diff --git a/iptables/tests/shell/testcases/iptables/0004-return-codes_0 b/iptables/tests/shell/testcases/iptables/0004-return-codes_0
index 34dffeee..5b6e1f6f 100755
--- a/iptables/tests/shell/testcases/iptables/0004-return-codes_0
+++ b/iptables/tests/shell/testcases/iptables/0004-return-codes_0
@@ -23,6 +23,10 @@ cmd 1 iptables -N foo
# iptables-nft allows this - bug or feature?
#cmd 2 iptables -N "invalid name"
+# test chain rename
+cmd 0 iptables -E foo bar
+cmd 1 iptables -E foo bar
+
# test rule adding
cmd 0 iptables -A INPUT -j ACCEPT
cmd 1 iptables -A noexist -j ACCEPT