From: Tobias Brunner Date: Fri, 9 Sep 2016 16:04:48 +0000 (+0200) Subject: testing: Add output of iptables-save X-Git-Tag: 5.5.1dr3~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ac67aeb100e17c1dd67626e376fac70a79e0670b;p=thirdparty%2Fstrongswan.git testing: Add output of iptables-save This might be helpful to get the complete picture of the installed rules. `-c` is currently not used as the counters that are added in front of every rule make the output quite hard to read and the counters are already provided in the accompanying `iptables -v -L` output. Fixes #2111. --- diff --git a/testing/do-tests b/testing/do-tests index 4aeb946bdc..8fcd7c82e9 100755 --- a/testing/do-tests +++ b/testing/do-tests @@ -533,11 +533,15 @@ do IPROUTE_DSP=$IPROUTE_CMD IPTABLES_CMD="$IPTABLES_CMD_V6" IPTABLES_DSP="ip6tables -L" + IPTABLES_SAVE_CMD="ip6tables-save" + IPTABLES_SAVE_DSP="ip6tables-save" else IPROUTE_CMD="ip route list table $SOURCEIP_ROUTING_TABLE" IPROUTE_DSP=$IPROUTE_CMD IPTABLES_CMD="$IPTABLES_CMD_V4" IPTABLES_DSP="iptables -L" + IPTABLES_SAVE_CMD="iptables-save" + IPTABLES_SAVE_DSP="iptables-save" fi if [ $name = "net2net-ip4-in-ip6-ikev2" -o $name = "net2net-ip6-in-ip4-ikev2" ] @@ -546,6 +550,8 @@ do IPROUTE_DSP="ip (-6) route list table $SOURCEIP_ROUTING_TABLE" IPTABLES_CMD="$IPTABLES_CMD_V4; echo; $IPTABLES_CMD_V6" IPTABLES_DSP="iptables -L ; ip6tables -L" + IPTABLES_SAVE_CMD="iptables-save; echo; ip6tables-save" + IPTABLES_SAVE_DSP="iptables-save ; ip6tables-save" fi for host in $DBHOSTS @@ -608,6 +614,8 @@ do > $TESTRESULTDIR/${host}.ip.route 2>/dev/null ssh $SSHCONF $HOSTLOGIN $IPTABLES_CMD \ > $TESTRESULTDIR/${host}.iptables 2>/dev/null + ssh $SSHCONF $HOSTLOGIN $IPTABLES_SAVE_CMD \ + > $TESTRESULTDIR/${host}.iptables-save 2>/dev/null chmod a+r $TESTRESULTDIR/* if [ -n "$SWANCTL" ] @@ -631,6 +639,7 @@ do
  • swanctl --list-pools
  • swanctl --list-authorities
  • swanctl --stats|--list-algs
  • +
  • auth.log
  • daemon.log
  • @@ -640,7 +649,7 @@ do
  • ip -s xfrm state
  • $IPROUTE_DSP
  • $IPTABLES_DSP
  • -
  • auth.log
  • +
  • $IPTABLES_SAVE_DSP
  •   @@ -675,6 +684,7 @@ do
  • ip -s xfrm state
  • $IPROUTE_DSP
  • $IPTABLES_DSP
  • +
  • $IPTABLES_SAVE_DSP