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>

SVN-Revision: 40566
This commit is contained in:
Steven Barth 2014-04-24 09:11:44 +00:00
parent 1c2dbe4e94
commit c4e09ccb05
2 changed files with 8 additions and 3 deletions

View file

@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=6rd PKG_NAME:=6rd
PKG_VERSION:=6 PKG_VERSION:=7
PKG_RELEASE:=1 PKG_RELEASE:=1
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk

View file

@ -26,8 +26,13 @@ proto_6rd_setup() {
( proto_add_host_dependency "$cfg" 0.0.0.0 ) ( proto_add_host_dependency "$cfg" 0.0.0.0 )
[ -z "$ipaddr" ] && { [ -z "$ipaddr" ] && {
local wanif local wanif="$tunlink"
if ! network_find_wan wanif || ! network_get_ipaddr ipaddr "$wanif"; then 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" proto_notify_error "$cfg" "NO_WAN_LINK"
return return
fi fi