diff options
author | cyrus <cyrus@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2014-04-08 06:19:37 +0000 |
---|---|---|
committer | cyrus <cyrus@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2014-04-08 06:19:37 +0000 |
commit | 1972881c20e5f43dd1bdb7f5a6d9e7423bcfd674 (patch) | |
tree | 1c46c78d04f767960a4c99518055bc6ca016638c /package/network/ipv6/ds-lite/files/dslite.sh | |
parent | 637dbc00477b34bd54801439cac3abc5e39dc6a5 (diff) |
ds-lite: compatibility with ISPs that only offer public PDs
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40422 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/ipv6/ds-lite/files/dslite.sh')
-rwxr-xr-x | package/network/ipv6/ds-lite/files/dslite.sh | 12 |
1 files changed, 8 insertions, 4 deletions
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" ] || { |