diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2012-09-27 18:30:07 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2012-09-27 18:30:07 +0000 |
commit | 7a575afa105a3ac8d29166a7c114c592a7505694 (patch) | |
tree | 4878266000326afdd52d2d2e85db403a1f960708 /package | |
parent | a1c5adc11642f7075f4f5ad83a967d8b424b8020 (diff) | |
download | upstream-7a575afa105a3ac8d29166a7c114c592a7505694.tar.gz upstream-7a575afa105a3ac8d29166a7c114c592a7505694.tar.bz2 upstream-7a575afa105a3ac8d29166a7c114c592a7505694.zip |
6to4: properly setup Base6to4Interface (#12251)
SVN-Revision: 33573
Diffstat (limited to 'package')
-rw-r--r-- | package/6to4/Makefile | 2 | ||||
-rwxr-xr-x | package/6to4/files/6to4.sh | 13 |
2 files changed, 10 insertions, 5 deletions
diff --git a/package/6to4/Makefile b/package/6to4/Makefile index fdf8627a45..f29571d86c 100644 --- a/package/6to4/Makefile +++ b/package/6to4/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=6to4 -PKG_VERSION:=10 +PKG_VERSION:=11 PKG_RELEASE:=1 include $(INCLUDE_DIR)/package.mk diff --git a/package/6to4/files/6to4.sh b/package/6to4/files/6to4.sh index f518b02332..3a616f675b 100755 --- a/package/6to4/files/6to4.sh +++ b/package/6to4/files/6to4.sh @@ -108,10 +108,15 @@ proto_6to4_setup() { ( proto_add_host_dependency "$cfg" 0.0.0.0 ) + local wanif + if ! network_find_wan wanif; then + proto_notify_error "$cfg" "NO_WAN_LINK" + return + fi + [ -z "$ipaddr" ] && { - local wanif - if ! network_find_wan wanif || ! network_get_ipaddr ipaddr "$wanif"; then - proto_notify_error "$cfg" "NO_WAN_LINK" + if ! network_get_ipaddr ipaddr "$wanif"; then + proto_notify_error "$cfg" "NO_WAN_ADDRESS" return fi } @@ -159,7 +164,7 @@ proto_6to4_setup() { set_6to4_radvd_interface "$sid" "$adv_interface" "$mtu" set_6to4_radvd_prefix "$sid" "$adv_interface" \ - "$wancfg" "$(printf "0:0:0:%x::/64" $adv_subnet)" \ + "$wanif" "$(printf "0:0:0:%x::/64" $adv_subnet)" \ "$adv_valid_lifetime" "$adv_preferred_lifetime" adv_subnets="${adv_subnets:+$adv_subnets }$adv_ifname:$subnet6" |