differentiate between executed and displayed iptables commands
authorAndreas Steffen <andreas.steffen@strongswan.org>
Wed, 3 Feb 2010 18:21:55 +0000 (19:21 +0100)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Wed, 3 Feb 2010 18:21:55 +0000 (19:21 +0100)
testing/do-tests.in

index 5c29e9b..338e106 100755 (executable)
@@ -46,7 +46,7 @@ TESTRESULTSHTML=$TODAYDIR/all.html
 INDEX=$TODAYDIR/index.html
 DEFAULTTESTSDIR=$UMLTESTDIR/testing/tests
 
-SOURCEIP_ROUTING_TABLE=@routing_table@
+SOURCEIP_ROUTING_TABLE=@IPSEC_ROUTING_TABLE@
 
 testnumber="0"
 failed_cnt="0"
@@ -245,9 +245,17 @@ do
 
        if [ $SUBDIR = "ipv6" -o $name = "rw-psk-ipv6" ]
        then
-           IPTABLES="ip6tables"
+           IPTABLES_CMD="ip6tables -v -n -L"
+           IPTABLES_DSP="ip6tables -L"
        else
-           IPTABLES="iptables"
+           IPTABLES_CMD="iptables -v -n -L"
+           IPTABLES_DSP="iptables -L"
+       fi
+
+       if [ $name = "net2net-ip4-in-ip6-ikev2" -o $name = "net2net-ip6-in-ip4-ikev2" ]
+       then
+           IPTABLES_CMD="iptables -v -n -L ; echo ; ip6tables -v -n -L"
+           IPTABLES_DSP="iptables -L ; ip6tables -L"
        fi
 
        [ -f $DEFAULTTESTSDIR/${testname}/description.txt ] || die "!! File 'description.txt' is missing"
@@ -476,7 +484,7 @@ do
                    > $TESTRESULTDIR/${host}.ip.state 2>/dev/null
            ssh $HOSTLOGIN ip route list table $SOURCEIP_ROUTING_TABLE \
                    > $TESTRESULTDIR/${host}.ip.route 2>/dev/null
-           ssh $HOSTLOGIN $IPTABLES -v -n -L \
+           ssh $HOSTLOGIN $IPTABLES_CMD \
                    > $TESTRESULTDIR/${host}.iptables 2>/dev/null
            chmod a+r $TESTRESULTDIR/*
            cat >> $TESTRESULTDIR/index.html <<@EOF
@@ -504,7 +512,7 @@ do
            <li><a href="$host.ip.policy">ip -s xfrm policy</a></li>
            <li><a href="$host.ip.state">ip -s xfrm state</a></li>
            <li><a href="$host.ip.route">ip route list table $SOURCEIP_ROUTING_TABLE</a></li>
-           <li><a href="$host.iptables">$IPTABLES -L</a></li>
+           <li><a href="$host.iptables">$IPTABLES_DSP</a></li>
          </ul>
       </td>
     </tr>