aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifdown-ipv6
diff options
context:
space:
mode:
Diffstat (limited to 'sysconfig/network-scripts/ifdown-ipv6')
-rwxr-xr-xsysconfig/network-scripts/ifdown-ipv620
1 files changed, 14 insertions, 6 deletions
diff --git a/sysconfig/network-scripts/ifdown-ipv6 b/sysconfig/network-scripts/ifdown-ipv6
index 8feabb71..b9120134 100755
--- a/sysconfig/network-scripts/ifdown-ipv6
+++ b/sysconfig/network-scripts/ifdown-ipv6
@@ -4,14 +4,14 @@
#
#
# Taken from:
-# (P) & (C) 2000-2002 by Peter Bieringer <pb@bieringer.de>
+# (P) & (C) 2000-2004 by Peter Bieringer <pb@bieringer.de>
#
-# You will find more information in the IPv6-HowTo for Linux at
-# http://www.bieringer.de/linux/IPv6/
+# You will find more information on the initscripts-ipv6 homepage at
+# http://www.deepspace6.net/projects/initscripts-ipv6.html
#
# RHL integration assistance by Pekka Savola <pekkas@netcore.fi>
#
-# Version 2002-10-30
+# Version 2004-09-02
#
# Note: if called as (like normally) by /etc/sysconfig/network-scripts/ifdown
# exit codes aren't handled by "ifdown"
@@ -84,6 +84,13 @@ fi
if [ -n "$IPV6TO4_IPV4ADDR" ]; then
# Take special configured from config file (precedence 1)
ipv4addr="$IPV6TO4_IPV4ADDR"
+
+ # Get IPv4 address from interface first
+ ipv4addrlocal="`ipv6_get_ipv4addr_of_device $DEVICE`"
+ if [ -z "$ipv4addrlocal" ]; then
+ # Take configured from config file
+ ipv4addrlocal="$IPADDR"
+ fi
else
# Get IPv4 address from interface first (has precedence 2)
ipv4addr="`ipv6_get_ipv4addr_of_device $DEVICE`"
@@ -91,17 +98,18 @@ else
# Take configured from config file (precedence 3)
ipv4addr="$IPADDR"
fi
+ ipv4addrlocal="$ipv4addr"
fi
# Get local IPv4 address of dedicated tunnel
ipv4addr6to4local="`ipv6_get_ipv4addr_of_tunnel tun6to4 local`"
-if [ -z "$ipv4addr" -o -z "$ipv4addr6to4local" ]; then
+if [ -z "$ipv4addrlocal" -o -z "$ipv4addr6to4local" ]; then
# no IPv4 addresses given, 6to4 sure not configured
valid6to4config="no"
else
# Check against configured 6to4 tunnel to see if this interface was used before
- if [ "$ipv4addr" != "$ipv4addr6to4local" ]; then
+ if [ "$ipv4addrlocal" != "$ipv4addr6to4local" ]; then
# IPv4 address of interface does't match local tunnel address, interface was not used for current 6to4 setup
valid6to4config="no"
fi