<para>For more informations see iproute2 documentation .</para>
</refsect1>
+ <refsect1>
+ <title><filename>/etc/sysconfig/static-routes6</filename></title>
+ <para>Same as <filename>/etc/sysconfig/static-routes</filename> but
+ for IPv6.</para>
+ </refsect1>
+
<refsect1>
<title><filename>/etc/sysconfig/routed</filename></title>
<simplelist>
<device> may be a device name to have the route brought up and
down with the device, or "any" to have the correct devices calculated
- at run time. [type] is optional. RH style isn't supported !
+ at run time. [type] is optional. RH style isn't supported!
Also you can set few options after "<gateway>":
tos <tos>
protocol <rtproto>
onlink
equalize
- For more informations see iproute2 documentation .
+ For more informations see iproute2 documentation.
+
+/etc/sysconfig/static-routes6:
+
+ Same as /etc/sysconfig/static-routes but for IPv6.
/etc/sysconfig/routed:
done
fi
fi
+ is_no "$IPV6_NETWORKING" && return
+ if [ -f /etc/sysconfig/static-routes6 ]; then
+ if [ "$1" = "on" -o "$1" = "yes" ]; then
+ grep -E "^(none|any)[[:blank:]]" /etc/sysconfig/static-routes6 | while read device args; do
+ /sbin/ip -6 route add $args
+ done
+ else
+ grep -E "^(none|any)[[:blank:]]" /etc/sysconfig/static-routes6 | while read device args; do
+ /sbin/ip -6 route del $args 2>/dev/null
+ done
+ fi
+ fi
}
# Add ONLY IPv4 address (IPv6 address is added automaticly)
fi
/sbin/ip route add $args dev lo
done
+ is_no "$IPV6_NETWORKING" && return
+ grep -E "^(lo|any)[[:blank:]]" /etc/sysconfig/static-routes6 | while read device args; do
+ /sbin/ip -6 route add $args dev lo
+ done
}
set_down_loopback()
done
elif is_no "$1"; then
LC_ALL=C /sbin/ip rule show | grep -vE -e "from all lookup (main|default|local) \$" -e " map-to " | while read prio from src args; do
- [ "$src" = "all" ] && ip rule delete $args || ip rule delete $from $src $args
+ [ "$src" = "all" ] && /sbin/ip rule delete $args || /sbin/ip rule delete $from $src $args
+ done
+ fi
+ fi
+ is_no "$IPV6_NETWORKING" && return
+ if [ -f /etc/sysconfig/static-routes6 ]; then
+ if is_yes "$1"; then
+ grep -E "^(from|to|iif|tos|fwmark|dev|pref|priority|prio)[[:blank:]]" /etc/sysconfig/static-routes6 | while read args; do
+ /sbin/ip -6 rule add $args
+ done
+ elif is_no "$1"; then
+ LC_ALL=C /sbin/ip -6 rule show | grep -vE -e "from all lookup (main|default|local) \$" -e " map-to " | while read prio from src args; do
+ [ "$src" = "all" ] && /sbin/ip -6 rule delete $args || /sbin/ip -6 rule delete $from $src $args
done
fi
fi
# Adds static routes which go through device $DEVICE
# Called from ifup-post.
-if [ ! -f /etc/sysconfig/static-routes ]; then
+if [ ! -f /etc/sysconfig/static-routes -a ! -f /etc/sysconfig/static-routes6 ]; then
return
fi
/sbin/ip route add $args dev $REALDEVICE
done
+if ! is_no "$IPV6_NETWORKING"; then
+ grep -E "^($DEVICE|any)[[:blank:]]" /etc/sysconfig/static-routes6 | while read device args; do
+ /sbin/ip -6 route add $args dev $REALDEVICE
+ done
+fi
# based on information from http://avahi.org/wiki/AvahiAutoipd#Routes
if is_yes "$ZEROCONF" && ! /sbin/ip link show dev $REALDEVICE | grep -q POINTOPOINT ; then