소스 검색

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 <[email protected]>

SVN-Revision: 40566
Steven Barth 11 년 전
부모
커밋
c4e09ccb05
2개의 변경된 파일8개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 1
      package/network/ipv6/6rd/Makefile
  2. 7 2
      package/network/ipv6/6rd/files/6rd.sh

+ 1 - 1
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

+ 7 - 2
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