From 3dbc16abe698daa238f76b3a1add4c41ec225067 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 7 Feb 2001 21:47:16 +0000 Subject: updated ipv6 stuff from Peter Bieringer --- sysconfig/network-scripts/ifup-sit | 41 ++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 15 deletions(-) (limited to 'sysconfig/network-scripts/ifup-sit') 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 -# some hints taken from RedHat scripts +# (P) & (C) 2000-2001 by Peter Bieringer +# +# 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 -- cgit v1.2.1