aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifup-sit
diff options
context:
space:
mode:
Diffstat (limited to 'sysconfig/network-scripts/ifup-sit')
-rwxr-xr-xsysconfig/network-scripts/ifup-sit41
1 files changed, 26 insertions, 15 deletions
diff --git a/sysconfig/network-scripts/ifup-sit b/sysconfig/network-scripts/ifup-sit
index ef703943..8a1daa56 100755
--- a/sysconfig/network-scripts/ifup-sit
+++ b/sysconfig/network-scripts/ifup-sit
@@ -2,9 +2,14 @@
#
# ifup-sit
#
+#
# Taken from:
-# (P) & (C) 2000 Peter Bieringer <pb@bieringer.de>
-# some hints taken from RedHat scripts
+# (P) & (C) 2000-2001 by Peter Bieringer <pb@bieringer.de>
+#
+# Version 2001-02-06
+#
+
+# Filter tags (for stripping, empty lines following if all is stripped)
. /etc/sysconfig/network
@@ -23,19 +28,25 @@ fi
# Test if IPv6 is up
if [ "${NETWORKING_IPV6}" = "yes" ]; then
- . /etc/sysconfig/network-scripts/network-functions-ipv6
+
+ . /etc/sysconfig/network-scripts/network-functions-ipv6
- # Setup tunnel
- if ! [ -z "$IPV6TUNNELIPV4" -o -z "$IPV6TUNNELROUTE" ]; then
- ifup_ipv6_tunnel $DEVICE $IPV6TUNNELIPV4 $IPV6TUNNELROUTE
- fi
+ # Setup IPv6-in-IPv4 tunnel(s)
+ if [ "$DEVICE" = "sit0" ]; then
+ ifup_ipv6_autotunnel
+ elif [ ! -z "$IPV6TUNNELIPV4" ]; then
+ if [ ! -z "$IPV6ADDR" ]; then
+ # Numbered tunnel
+ ifup_ipv6_real sit0 $IPV6ADDR $IPV6PREFIXLENGTH
+ fi
- # Add additional static IPv6 routes on specified interface
- if [ -f /etc/sysconfig/static-routes-ipv6 ]; then
- grep "^$DEVICE" /etc/sysconfig/static-routes-ipv6 | while read device ipv6route args; do
- if [ "$device" = "$DEVICE" ]; then
- ifup_ipv6_tunnel $DEVICE $IPV6TUNNELIPV4 $ipv6route
- fi
- done
- fi
+ # Add static IPv6 tunnel routes on specified virtual interface
+ if [ -f /etc/sysconfig/static-routes-ipv6 ]; then
+ grep "^$DEVICE" /etc/sysconfig/static-routes-ipv6 | while read device ipv6route args; do
+ if [ "$device" = "$DEVICE" ]; then
+ ifup_ipv6_tunnel $DEVICE $IPV6TUNNELIPV4 $ipv6route
+ fi
+ done
+ fi
+ fi
fi