summaryrefslogtreecommitdiffstats
path: root/package/6to4/files
diff options
context:
space:
mode:
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-09-27 18:30:07 +0000
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-09-27 18:30:07 +0000
commitbf8ba4e0cfc944eb300495bfdc09e94f6a7df652 (patch)
tree008c121ff7a0384fc42c216142e971803d77a765 /package/6to4/files
parentf8f2f71426017cd17762b875cca6c1baf13cf155 (diff)
[package] 6to4: properly setup Base6to4Interface (#12251)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33573 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/6to4/files')
-rwxr-xr-xpackage/6to4/files/6to4.sh13
1 files changed, 9 insertions, 4 deletions
diff --git a/package/6to4/files/6to4.sh b/package/6to4/files/6to4.sh
index f518b0233..3a616f675 100755
--- a/package/6to4/files/6to4.sh
+++ b/package/6to4/files/6to4.sh
@@ -108,10 +108,15 @@ proto_6to4_setup() {
( proto_add_host_dependency "$cfg" 0.0.0.0 )
+ local wanif
+ if ! network_find_wan wanif; then
+ proto_notify_error "$cfg" "NO_WAN_LINK"
+ return
+ fi
+
[ -z "$ipaddr" ] && {
- local wanif
- if ! network_find_wan wanif || ! network_get_ipaddr ipaddr "$wanif"; then
- proto_notify_error "$cfg" "NO_WAN_LINK"
+ if ! network_get_ipaddr ipaddr "$wanif"; then
+ proto_notify_error "$cfg" "NO_WAN_ADDRESS"
return
fi
}
@@ -159,7 +164,7 @@ proto_6to4_setup() {
set_6to4_radvd_interface "$sid" "$adv_interface" "$mtu"
set_6to4_radvd_prefix "$sid" "$adv_interface" \
- "$wancfg" "$(printf "0:0:0:%x::/64" $adv_subnet)" \
+ "$wanif" "$(printf "0:0:0:%x::/64" $adv_subnet)" \
"$adv_valid_lifetime" "$adv_preferred_lifetime"
adv_subnets="${adv_subnets:+$adv_subnets }$adv_ifname:$subnet6"