From 8c6c71737b9e0719ede289be00ff12e1e16338e8 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sun, 6 Mar 2011 22:19:41 +0000 Subject: [PATCH] 6in4: add default route workarounds for Kernel 2.4, thanks to Paul Fertser for reporting SVN-Revision: 25909 --- package/6in4/files/6in4.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/package/6in4/files/6in4.sh b/package/6in4/files/6in4.sh index 5f8dfffe57..5aafaa0ba1 100755 --- a/package/6in4/files/6in4.sh +++ b/package/6in4/files/6in4.sh @@ -73,7 +73,11 @@ setup_interface_6in4() { uci_set_state network "$cfg" ip6addr $local6 [ "$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 } @@ -94,7 +98,11 @@ stop_interface_6in4() { env -i ACTION="ifdown" INTERFACE="$cfg" DEVICE="$link" PROTO=6in4 /sbin/hotplug-call "iface" & [ "$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 -- 2.30.2