ds-lite: compatibility with ISPs that only offer public PDs

SVN-Revision: 40422
lede-17.01
Steven Barth 2014-04-08 06:19:37 +00:00
parent 8333ce1963
commit 4abcae7a1c
2 changed files with 9 additions and 5 deletions

View File

@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=ds-lite PKG_NAME:=ds-lite
PKG_VERSION:=2 PKG_VERSION:=3
PKG_RELEASE:=1 PKG_RELEASE:=1
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk

View File

@ -14,8 +14,8 @@ proto_dslite_setup() {
local iface="$2" local iface="$2"
local link="dslite-$cfg" local link="dslite-$cfg"
local mtu ttl peeraddr ip6addr tunlink zone local mtu ttl peeraddr ip6addr tunlink zone weakif
json_get_vars mtu ttl peeraddr ip6addr tunlink zone json_get_vars mtu ttl peeraddr ip6addr tunlink zone weakif
[ -z "$peeraddr" ] && { [ -z "$peeraddr" ] && {
proto_notify_error "$cfg" "MISSING_ADDRESS" proto_notify_error "$cfg" "MISSING_ADDRESS"
@ -33,8 +33,11 @@ proto_dslite_setup() {
fi fi
if ! network_get_ipaddr6 ip6addr "$wanif"; then if ! network_get_ipaddr6 ip6addr "$wanif"; then
proto_notify_error "$cfg" "NO_WAN_LINK" [ -z "$weakif" ] && weakif="lan"
return if ! network_get_ipaddr6 ip6addr "$weakif"; then
proto_notify_error "$cfg" "NO_WAN_LINK"
return
fi
fi fi
} }
@ -72,6 +75,7 @@ proto_dslite_init_config() {
proto_config_add_int "mtu" proto_config_add_int "mtu"
proto_config_add_int "ttl" proto_config_add_int "ttl"
proto_config_add_string "zone" proto_config_add_string "zone"
proto_config_add_string "weakif"
} }
[ -n "$INCLUDE_ONLY" ] || { [ -n "$INCLUDE_ONLY" ] || {