6to4: fix interface error handling
authorFelix Fietkau <nbd@openwrt.org>
Mon, 19 Mar 2012 21:09:57 +0000 (21:09 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 19 Mar 2012 21:09:57 +0000 (21:09 +0000)
SVN-Revision: 31034

package/6to4/files/6to4.sh

index 0b7bf31bbbd9be15300cf557a9a75538bf61f988..682538564835b912f460120b887e3fe685ca336d 100755 (executable)
@@ -126,14 +126,14 @@ proto_6to4_setup() {
 
        local wanif=$(find_6to4_wanif)
        [ -z "$wanif" ] && {
-               tun_error "NO_WAN_LINK"
+               tun_error "$cfg" "NO_WAN_LINK"
                return
        }
 
        . /lib/network/config.sh
        local wancfg="$(find_config "$wanif")"
        [ -z "$wancfg" ] && {
-               tun_error "NO_WAN_LINK"
+               tun_error "$cfg" "NO_WAN_LINK"
                return
        }
 
@@ -144,12 +144,12 @@ proto_6to4_setup() {
        }
 
        [ -z "$local4" ] && {
-               tun_error "NO_WAN_LINK"
+               tun_error "$cfg" "NO_WAN_LINK"
                return
        }
 
        test_6to4_rfc1918 "$local4" && {
-               tun_error "INVALID_LOCAL_ADDRESS"
+               tun_error "$cfg" "INVALID_LOCAL_ADDRESS"
                return
        }