diff options
Diffstat (limited to 'ppp')
-rw-r--r-- | ppp/ip-up.ipv6to4 | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/ppp/ip-up.ipv6to4 b/ppp/ip-up.ipv6to4 index be45e488..37fdbb75 100644 --- a/ppp/ip-up.ipv6to4 +++ b/ppp/ip-up.ipv6to4 @@ -9,7 +9,7 @@ # You will find more information in the IPv6-HowTo for Linux at # http://www.bieringer.de/linux/IPv6/ # -# Version 2002-11-12a +# Version 2002-11-14 # # Calling parameters: # $1: interface name @@ -138,6 +138,9 @@ if [ "$IPV6TO4INIT" = "yes" ]; then # Setup new data ipv6_add_6to4_tunnel tun6to4 $ipv4addr "" $tunnelmtu || exit 1 + # Add route to for compatible addresses (removed later again) + ipv6_add_route "::/96" "::" tun6to4 + # Add default route, if device matches if [ "$IPV6_DEFAULTDEV" = "tun6to4" ]; then if [ -n "$IPV6_DEFAULTGW" ]; then @@ -158,6 +161,17 @@ if [ "$IPV6TO4INIT" = "yes" ]; then ipv6_add_route $network $gateway tun6to4 done fi + + # Setup additional static IPv6 routes (newer config style) + if [ -f "/etc/sysconfig/network-scripts/route6-tun6to4" ]; then + cat "/etc/sysconfig/network-scripts/route6-tun6to4" | sed 's/#.*//g' | grep -v '^[[:space:]]*$' | while read line; do + if echo "$line" | grep -vq 'via'; then + # Add gateway if missing + line="$line via $ipv6to4_relay" + fi + ipv6_exec_ip -6 route add $line + done + fi # Cleanup autmatically generated autotunnel (not needed for 6to4) ipv6_del_route "::/96" "::" tun6to4 |