diff options
author | Steven Barth <cyrus@openwrt.org> | 2014-04-08 06:19:37 +0000 |
---|---|---|
committer | Steven Barth <cyrus@openwrt.org> | 2014-04-08 06:19:37 +0000 |
commit | 4abcae7a1cd1092e8fd3ef5aee4c97108917a4ad (patch) | |
tree | 28cef8ccc78719ba0bf520dad0403e7bd67403dd /package | |
parent | 8333ce196369c4668d6fa9e4f126a5a77655dcda (diff) | |
download | upstream-4abcae7a1cd1092e8fd3ef5aee4c97108917a4ad.tar.gz upstream-4abcae7a1cd1092e8fd3ef5aee4c97108917a4ad.tar.bz2 upstream-4abcae7a1cd1092e8fd3ef5aee4c97108917a4ad.zip |
ds-lite: compatibility with ISPs that only offer public PDs
SVN-Revision: 40422
Diffstat (limited to 'package')
-rw-r--r-- | package/network/ipv6/ds-lite/Makefile | 2 | ||||
-rwxr-xr-x | package/network/ipv6/ds-lite/files/dslite.sh | 12 |
2 files changed, 9 insertions, 5 deletions
diff --git a/package/network/ipv6/ds-lite/Makefile b/package/network/ipv6/ds-lite/Makefile index a806f67ab9..61c57c092c 100644 --- a/package/network/ipv6/ds-lite/Makefile +++ b/package/network/ipv6/ds-lite/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ds-lite -PKG_VERSION:=2 +PKG_VERSION:=3 PKG_RELEASE:=1 include $(INCLUDE_DIR)/package.mk diff --git a/package/network/ipv6/ds-lite/files/dslite.sh b/package/network/ipv6/ds-lite/files/dslite.sh index f4efa1c4c3..670f93cd6e 100755 --- a/package/network/ipv6/ds-lite/files/dslite.sh +++ b/package/network/ipv6/ds-lite/files/dslite.sh @@ -14,8 +14,8 @@ proto_dslite_setup() { local iface="$2" local link="dslite-$cfg" - local mtu ttl peeraddr ip6addr tunlink zone - json_get_vars mtu ttl peeraddr ip6addr tunlink zone + local mtu ttl peeraddr ip6addr tunlink zone weakif + json_get_vars mtu ttl peeraddr ip6addr tunlink zone weakif [ -z "$peeraddr" ] && { proto_notify_error "$cfg" "MISSING_ADDRESS" @@ -33,8 +33,11 @@ proto_dslite_setup() { fi if ! network_get_ipaddr6 ip6addr "$wanif"; then - proto_notify_error "$cfg" "NO_WAN_LINK" - return + [ -z "$weakif" ] && weakif="lan" + if ! network_get_ipaddr6 ip6addr "$weakif"; then + proto_notify_error "$cfg" "NO_WAN_LINK" + return + fi fi } @@ -72,6 +75,7 @@ proto_dslite_init_config() { proto_config_add_int "mtu" proto_config_add_int "ttl" proto_config_add_string "zone" + proto_config_add_string "weakif" } [ -n "$INCLUDE_ONLY" ] || { |