aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts
diff options
context:
space:
mode:
Diffstat (limited to 'sysconfig/network-scripts')
-rwxr-xr-xsysconfig/network-scripts/ifup-ipv623
-rwxr-xr-xsysconfig/network-scripts/ifup-sit17
2 files changed, 38 insertions, 2 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"
diff --git a/sysconfig/network-scripts/ifup-sit b/sysconfig/network-scripts/ifup-sit
index ada8b086..2f629850 100755
--- a/sysconfig/network-scripts/ifup-sit
+++ b/sysconfig/network-scripts/ifup-sit
@@ -8,7 +8,7 @@
#
# RHL integration assistance by Pekka Savola <pekkas@netcore.fi>
#
-# Version 2002-11-01
+# Version 2002-12-04
#
# Uses following information from /etc/sysconfig/network:
# NETWORKING_IPV6=yes|no: controls IPv6 initialization (global setting)
@@ -24,6 +24,7 @@
# IPV6TUNNELIPV4=<IPv4 address>: IPv4 address of remote tunnel endpoint
# IPV6TUNNELIPV4LOCAL=<IPv4 address>: (optional) local IPv4 address of tunnel
# IPV6ADDR=<IPv6 address>[/<prefix length>]: (optional) local IPv6 address of a numbered tunnel
+# IPV6ADDR_SECONDARIES="<IPv6 address>[/<prefix length>] ..." (optional) additional local IPv6 addresses
#
@@ -85,6 +86,13 @@ if [ -n "$IPV6ADDR" ]; then
ipv6_add_addr_on_device $DEVICE $IPV6ADDR
fi
+# Setup additional IPv6 addresses from list, if given
+if [ -n "$IPV6ADDR_SECONDARIES" ]; then
+ for ipv6addr in $IPV6ADDR_SECONDARIES; do
+ ipv6_add_addr_on_device $DEVICE $ipv6addr
+ done
+fi
+
# Setup default IPv6 route, check are done by function
if [ -n "$IPV6_DEFAULTDEV" -o -n "$IPV6_DEFAULTGW" ]; then
ipv6_set_default_route "$IPV6_DEFAULTGW" "$IPV6_DEFAULTDEV" "$DEVICE"
@@ -96,3 +104,10 @@ if [ -f /etc/sysconfig/static-routes-ipv6 ]; then
ipv6_add_route $ipv6route :: $DEVICE
done
fi
+
+# Setup additional static IPv6 routes (newer config style)
+if [ -f "/etc/sysconfig/network-scripts/route6-$REALDEVICE" ]; then
+ cat "/etc/sysconfig/network-scripts/route6-$REALDEVICE" | sed 's/#.*//g' | grep -v '^[[:space:]]*$' | while read line; do
+ ipv6_exec_ip -6 route add $line
+ done
+fi