aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifup-ipv6
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2003-01-07 21:18:38 +0000
committerBill Nottingham <notting@redhat.com>2003-01-07 21:18:38 +0000
commitd5382134f21c8b2ad8df0ac7e50e7bd460b7589e (patch)
treed346ee09f21a852a95f2b6dd1736deb1c9fb2b02 /sysconfig/network-scripts/ifup-ipv6
parent3061c823c0566c5efeefae12d48d4bb95c2acc7a (diff)
downloadinitscripts-d5382134f21c8b2ad8df0ac7e50e7bd460b7589e.tar
initscripts-d5382134f21c8b2ad8df0ac7e50e7bd460b7589e.tar.gz
initscripts-d5382134f21c8b2ad8df0ac7e50e7bd460b7589e.tar.bz2
initscripts-d5382134f21c8b2ad8df0ac7e50e7bd460b7589e.tar.xz
initscripts-d5382134f21c8b2ad8df0ac7e50e7bd460b7589e.zip
IPv6 updates <pekkas@netcore.fi>, <pb@bieringer.de>
Diffstat (limited to 'sysconfig/network-scripts/ifup-ipv6')
-rwxr-xr-xsysconfig/network-scripts/ifup-ipv623
1 files changed, 22 insertions, 1 deletions
diff --git a/sysconfig/network-scripts/ifup-ipv6 b/sysconfig/network-scripts/ifup-ipv6
index 45b1140a..62abbf69 100755
--- a/sysconfig/network-scripts/ifup-ipv6
+++ b/sysconfig/network-scripts/ifup-ipv6
@@ -11,7 +11,7 @@
#
# RHL integration assistance by Pekka Savola <pekkas@netcore.fi>
#
-# Version 2002-11-12a
+# Version 2002-11-14
#
# Note: if called (like normally) by /etc/sysconfig/network-scripts/ifup
# exit codes aren't handled by "ifup"
@@ -154,6 +154,13 @@ if [ -f /etc/sysconfig/static-routes-ipv6 ]; then
done
fi
+# Setup additional static IPv6 routes (newer config style)
+if [ -f "/etc/sysconfig/network-scripts/route6-$DEVICE" ]; then
+ cat "/etc/sysconfig/network-scripts/route6-$DEVICE" | sed 's/#.*//g' | grep -v '^[[:space:]]*$' | while read line; do
+ ipv6_exec_ip -6 route add $line
+ done
+fi
+
# Setup of 6to4, if configured
if [ "$IPV6TO4INIT" = "yes" ]; then
valid6to4config="yes"
@@ -216,6 +223,9 @@ if [ "$IPV6TO4INIT" = "yes" ]; then
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
@@ -237,6 +247,17 @@ if [ "$IPV6TO4INIT" = "yes" ]; then
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
ipv6_del_addr_on_device tun6to4 "::$ipv4addr/128"