[LTP] [PATCH] iptables_tests.sh: nat table can have 4 chains

Simon Xu
2013-10-31T06:14:02Z

It is considered by iptables_tests.sh a failure When nat table chain count is
not 3, while recent kernels can have 4 built-in chains in nat table, namely
PREROUTING, OUTPUT, POSTROUTING and INPUT.
---
testcases/network/iptables/iptables_tests.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/network/iptables/iptables_tests.sh b/testcases/network/iptables/iptables_tests.sh
index 028d54e..77ee29b 100755
--- a/testcases/network/iptables/iptables_tests.sh
+++ b/testcases/network/iptables/iptables_tests.sh
@@ -165,7 +165,7 @@ test01()
return $RC
else
chaincnt=$(grep -c Chain $LTPTMP/tst_iptables.out)
- if [ $chaincnt -ne 3 ]; then
+ if [ $chaincnt -ne 3 ] && [ $chaincnt -ne 4 ]; then
tst_res TFAIL $LTPTMP/tst_iptables.out \
"$TCID: $cmd failed to list rules. Reason:"
return $chaincnt
--
1.8.4

------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net