aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifdown-ipv6
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2004-09-10 15:40:18 +0000
committerBill Nottingham <notting@redhat.com>2004-09-10 15:40:18 +0000
commit20b76ac80c2aa64128fef505c774ffda166b2a3c (patch)
tree95f884e6bb5e4b9387bfd8f3bf616526e4ebda7c /sysconfig/network-scripts/ifdown-ipv6
parent1129c1b2ff3ff4a2d9c5ae7cc390e401f42f51ba (diff)
downloadinitscripts-20b76ac80c2aa64128fef505c774ffda166b2a3c.tar
initscripts-20b76ac80c2aa64128fef505c774ffda166b2a3c.tar.gz
initscripts-20b76ac80c2aa64128fef505c774ffda166b2a3c.tar.bz2
initscripts-20b76ac80c2aa64128fef505c774ffda166b2a3c.tar.xz
initscripts-20b76ac80c2aa64128fef505c774ffda166b2a3c.zip
fix IPv6 6to4 & NAT (#118928, <pb@bieringer.de>, <pekkas@netcore.fi>)
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