summaryrefslogtreecommitdiff
path: root/package/network/ipv6/6rd/files/6rd.sh
diff options
context:
space:
mode:
Diffstat (limited to 'package/network/ipv6/6rd/files/6rd.sh')
-rw-r--r--package/network/ipv6/6rd/files/6rd.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/package/network/ipv6/6rd/files/6rd.sh b/package/network/ipv6/6rd/files/6rd.sh
index 58b16c8..db70b5a 100644
--- a/package/network/ipv6/6rd/files/6rd.sh
+++ b/package/network/ipv6/6rd/files/6rd.sh
@@ -26,8 +26,13 @@ proto_6rd_setup() {
( proto_add_host_dependency "$cfg" 0.0.0.0 )
[ -z "$ipaddr" ] && {
- local wanif
- if ! network_find_wan wanif || ! network_get_ipaddr ipaddr "$wanif"; then
+ local wanif="$tunlink"
+ if [ -z $wanif ] && ! network_find_wan wanif; then
+ proto_notify_error "$cfg" "NO_WAN_LINK"
+ return
+ fi
+
+ if ! network_get_ipaddr ipaddr "$wanif"; then
proto_notify_error "$cfg" "NO_WAN_LINK"
return
fi