aboutsummaryrefslogtreecommitdiffstats
path: root/testing/do-tests
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2016-09-09 17:24:05 +0200
committerTobias Brunner <tobias@strongswan.org>2016-09-12 16:15:14 +0200
commitfa36699bfab147d507a629b3d7ef257c19770144 (patch)
tree19d855d95f4ec795ecf1940fde17af69cd02648c /testing/do-tests
parent92ccc0b4122ddf0e097a12a6cd04173fe0367457 (diff)
downloadstrongswan-fa36699bfab147d507a629b3d7ef257c19770144.tar.bz2
strongswan-fa36699bfab147d507a629b3d7ef257c19770144.tar.xz
testing: List `nat` and `mangle` tables in addition to the `filter` table
This is useful in scenarios that e.g. use NAT and/or marks. References #2111.
Diffstat (limited to 'testing/do-tests')
-rwxr-xr-xtesting/do-tests9
1 files changed, 6 insertions, 3 deletions
diff --git a/testing/do-tests b/testing/do-tests
index 7d7046d19..4aeb946bd 100755
--- a/testing/do-tests
+++ b/testing/do-tests
@@ -524,16 +524,19 @@ do
<img src="../../images/$DIAGRAM" alt="$VIRTHOSTS">
@EOF
+ IPTABLES_CMD_V4="echo -e '=== filter table ==='; iptables -v -n -L; echo -e '\n=== nat table ==='; iptables -v -n -t nat -L; echo -e '\n=== mangle table ==='; iptables -v -n -t mangle -L"
+ IPTABLES_CMD_V6="echo -e '=== filter table ==='; ip6tables -v -n -L; echo -e '\n=== nat table ==='; ip6tables -v -n -t nat -L; echo -e '\n=== mangle table ==='; ip6tables -v -n -t mangle -L"
+
if [ -n "$IPV6" ]
then
IPROUTE_CMD="ip -6 route list table $SOURCEIP_ROUTING_TABLE"
IPROUTE_DSP=$IPROUTE_CMD
- IPTABLES_CMD="ip6tables -v -n -L"
+ IPTABLES_CMD="$IPTABLES_CMD_V6"
IPTABLES_DSP="ip6tables -L"
else
IPROUTE_CMD="ip route list table $SOURCEIP_ROUTING_TABLE"
IPROUTE_DSP=$IPROUTE_CMD
- IPTABLES_CMD="iptables -v -n -L"
+ IPTABLES_CMD="$IPTABLES_CMD_V4"
IPTABLES_DSP="iptables -L"
fi
@@ -541,7 +544,7 @@ do
then
IPROUTE_CMD="ip route list table $SOURCEIP_ROUTING_TABLE; echo; ip -6 route list table $SOURCEIP_ROUTING_TABLE"
IPROUTE_DSP="ip (-6) route list table $SOURCEIP_ROUTING_TABLE"
- IPTABLES_CMD="iptables -v -n -L ; echo ; ip6tables -v -n -L"
+ IPTABLES_CMD="$IPTABLES_CMD_V4; echo; $IPTABLES_CMD_V6"
IPTABLES_DSP="iptables -L ; ip6tables -L"
fi