diff --git a/common/linux_iphelper.sh b/common/linux_iphelper.sh index a392083..b7dc0db 100644 --- a/common/linux_iphelper.sh +++ b/common/linux_iphelper.sh @@ -4,6 +4,8 @@ # PREROUTING - can't DNAT to ::1. can DNAT to link local of -i interface or to any global addr # not a good idea to expose tpws to the world (bind to ::) +# max wait time for the link local ipv6 on the LAN interface +LINKLOCAL_WAIT_SEC=${LINKLOCAL_WAIT_SEC:-5} get_ipv6_linklocal() { diff --git a/init.d/openwrt/functions b/init.d/openwrt/functions index 7424723..cb0f0c1 100644 --- a/init.d/openwrt/functions +++ b/init.d/openwrt/functions @@ -25,9 +25,6 @@ CUSTOM_DIR="$ZAPRET_RW/init.d/openwrt" TPWS_LOCALHOST4=127.0.0.127 -# max wait time for the link local ipv6 on the LAN interface -LINKLOCAL_WAIT_SEC=5 - IPSET_CR="$ZAPRET_BASE/ipset/create_ipset.sh" # can be multiple ipv6 outgoing interfaces diff --git a/init.d/sysv/functions b/init.d/sysv/functions index bfa3d99..59e488e 100644 --- a/init.d/sysv/functions +++ b/init.d/sysv/functions @@ -90,9 +90,6 @@ TPWS_WAIT_SOCKS6="$TPWS_WAIT --bind-wait-ip-linklocal=30" # first wait for lan to ifup, then wait for bind-wait-ip-linklocal seconds for link local address and bind-wait-ip for any ipv6 as the worst case TPWS_OPT_BASE6_PRE="--bind-linklocal=prefer $TPWS_WAIT --bind-wait-ip-linklocal=3" -# max wait time for the link local ipv6 on the LAN interface -LINKLOCAL_WAIT_SEC=5 - dnat6_target() { _dnat6_target "$@"