[OpenWrt-Devel] 6in4 does not recover after wan outage

Weedy weedy2887 at gmail.com
Fri Aug 22 19:19:37 EDT 2014

On Fri, Aug 22, 2014 at 9:15 AM, Richard Mortimer
<richm+openwrt at oldelvet.org.uk> wrote:
> However I've noticed that if the ADSL line drops then when it recovers my
> SiXXS 6in4 tunnel does not automatically re-establish the connection. There
> doesn't seem to be any magic config values to set either in the LUCI
> interface or at
> http://wiki.openwrt.org/doc/uci/network#protocol.6in4.ipv6-in-ipv4.tunnel
> Is this a missing feature or is there a bug lurking somewhere in the new
> event mechanism?

Incase you need it "fixed" now, here's a workaround.
Throw this in like /etc/hotplug.d/iface/99-6in4-fix.
Not tested, chopped down version of what I run for another reason.
The loop isn't 10 seconds. The failed ping takes about 7 seconds. So
this tests the wan int for about 1m30s.

if [ "$ACTION" = "ifup" ] && [ "$INTERFACE" = "wan" ]; then
    fix6in4 () {
        . /lib/functions/network.sh
        network_get_device wanIF "wan"
        ping="/bin/ping -W 3 -c 5 -q -I $wanIF"
        until [ "$loop" -gt "10" ] || $ping  > /dev/null 2>&1; do
            let loop++
            sleep 1
        if [ "$loop" -lt "11" ]; then ifup wan6
        else /usr/bin/logger -t 6in4-fix -p user.notice "Failed to
reset 6in4 tunnel."; fi
    fix6in4 &
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list