aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/ipv6
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2014-04-24 09:11:44 +0000
committerSteven Barth <steven@midlink.org>2014-04-24 09:11:44 +0000
commita7cefa53f07ec1f4fb00cad8aeeb9750f4056945 (patch)
treecce4729af3c7839445392301d00280f2654c7559 /package/network/ipv6
parentdd1c8926c78f75926754b011f328e85dd4fc4e1f (diff)
downloadmaster-187ad058-a7cefa53f07ec1f4fb00cad8aeeb9750f4056945.tar.gz
master-187ad058-a7cefa53f07ec1f4fb00cad8aeeb9750f4056945.tar.bz2
master-187ad058-a7cefa53f07ec1f4fb00cad8aeeb9750f4056945.zip
6rd: Select first IPv4 address from configured tunlink interface as local tunnel address
Gives the user the control to select the correct WAN IPv4 address to be used by the 6rd tunnel when mutiple WAN interfaces are configured Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40566 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/ipv6')
-rw-r--r--package/network/ipv6/6rd/Makefile2
-rw-r--r--package/network/ipv6/6rd/files/6rd.sh9
2 files changed, 8 insertions, 3 deletions
diff --git a/package/network/ipv6/6rd/Makefile b/package/network/ipv6/6rd/Makefile
index 19177f1c46..390e012c9f 100644
--- a/package/network/ipv6/6rd/Makefile
+++ b/package/network/ipv6/6rd/Makefile
@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=6rd
-PKG_VERSION:=6
+PKG_VERSION:=7
PKG_RELEASE:=1
include $(INCLUDE_DIR)/package.mk
diff --git a/package/network/ipv6/6rd/files/6rd.sh b/package/network/ipv6/6rd/files/6rd.sh
index 58b16c8ff7..db70b5a6c1 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