aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsysconfig/network-scripts/ifdown-ipsec6
1 files changed, 6 insertions, 0 deletions
diff --git a/sysconfig/network-scripts/ifdown-ipsec b/sysconfig/network-scripts/ifdown-ipsec
index 695a71a1..92694d3c 100755
--- a/sysconfig/network-scripts/ifdown-ipsec
+++ b/sysconfig/network-scripts/ifdown-ipsec
@@ -34,6 +34,12 @@ fi
[ -z "$KEYING" ] && KEYING=manual
+if [ -n "$SRCNET" -o -n "$DSTNET" ]; then
+ MODE=tunnel
+else
+ MODE=host
+fi
+
if [ -z "$SRC" ]; then
SRC=`ip -o route get to $DST | sed "s|.*src \([^ ]*\).*|\1|"`
fi