mirror of https://github.com/hak5/openwrt-owl.git
parent
a1c5adc116
commit
7a575afa10
|
@ -8,7 +8,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=6to4
|
PKG_NAME:=6to4
|
||||||
PKG_VERSION:=10
|
PKG_VERSION:=11
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
|
@ -108,12 +108,17 @@ proto_6to4_setup() {
|
||||||
|
|
||||||
( proto_add_host_dependency "$cfg" 0.0.0.0 )
|
( proto_add_host_dependency "$cfg" 0.0.0.0 )
|
||||||
|
|
||||||
[ -z "$ipaddr" ] && {
|
|
||||||
local wanif
|
local wanif
|
||||||
if ! network_find_wan wanif || ! network_get_ipaddr ipaddr "$wanif"; then
|
if ! network_find_wan wanif; then
|
||||||
proto_notify_error "$cfg" "NO_WAN_LINK"
|
proto_notify_error "$cfg" "NO_WAN_LINK"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
[ -z "$ipaddr" ] && {
|
||||||
|
if ! network_get_ipaddr ipaddr "$wanif"; then
|
||||||
|
proto_notify_error "$cfg" "NO_WAN_ADDRESS"
|
||||||
|
return
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
test_6to4_rfc1918 "$ipaddr" && {
|
test_6to4_rfc1918 "$ipaddr" && {
|
||||||
|
@ -159,7 +164,7 @@ proto_6to4_setup() {
|
||||||
|
|
||||||
set_6to4_radvd_interface "$sid" "$adv_interface" "$mtu"
|
set_6to4_radvd_interface "$sid" "$adv_interface" "$mtu"
|
||||||
set_6to4_radvd_prefix "$sid" "$adv_interface" \
|
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_valid_lifetime" "$adv_preferred_lifetime"
|
||||||
|
|
||||||
adv_subnets="${adv_subnets:+$adv_subnets }$adv_ifname:$subnet6"
|
adv_subnets="${adv_subnets:+$adv_subnets }$adv_ifname:$subnet6"
|
||||||
|
|
Loading…
Reference in New Issue