1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-12 03:56:15 +02:00

[package] 6in4: add default route workarounds for Kernel 2.4, thanks to Paul Fertser for reporting

git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@25909 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
jow 2011-03-06 22:19:41 +00:00
parent 71d6b2aaf1
commit c7c97414fe

View File

@ -73,7 +73,11 @@ setup_interface_6in4() {
uci_set_state network "$cfg" ip6addr $local6 uci_set_state network "$cfg" ip6addr $local6
[ "$defaultroute" = 1 ] && { [ "$defaultroute" = 1 ] && {
ip -6 route add ::/0 ${metric:+metric $metric} dev $link local inet="::/0"
local kern="$(uname -r)"
[ "${kern#2.4}" != "$kern" ] && inet="2000::/3"
ip -6 route add $inet ${metric:+metric $metric} dev $link
uci_set_state network "$cfg" defaultroute 1 uci_set_state network "$cfg" defaultroute 1
} }
@ -94,7 +98,11 @@ stop_interface_6in4() {
env -i ACTION="ifdown" INTERFACE="$cfg" DEVICE="$link" PROTO=6in4 /sbin/hotplug-call "iface" & env -i ACTION="ifdown" INTERFACE="$cfg" DEVICE="$link" PROTO=6in4 /sbin/hotplug-call "iface" &
[ "$defaultroute" = "1" ] && { [ "$defaultroute" = "1" ] && {
ip -6 route del ::/0 dev $link local inet="::/0"
local kern="$(uname -r)"
[ "${kern#2.4}" != "$kern" ] && inet="2000::/3"
ip -6 route del $inet dev $link
} }
ip addr del $local6 dev $link ip addr del $local6 dev $link