From 08e785dc2d1ca2fb1b85dd7f6fe3ca72c470f7d5 Mon Sep 17 00:00:00 2001 From: juewuy Date: Sat, 4 Apr 2026 10:40:35 +0800 Subject: [PATCH] =?UTF-8?q?~=E5=A2=9E=E5=8A=A0ipv6host=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E7=9A=84fallback?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/starts/fw_getlanip.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/starts/fw_getlanip.sh b/scripts/starts/fw_getlanip.sh index c45030bb..2e3cb0be 100644 --- a/scripts/starts/fw_getlanip.sh +++ b/scripts/starts/fw_getlanip.sh @@ -11,6 +11,7 @@ getlanip() { #获取局域网host地址 ip -6 addr show dev $iface 2>/dev/null done | grep 'scope global' | awk '{print $2}' | tr '\n' ' ' | sed 's/ $//' ) + [ -z "$host_ipv6" ] && host_ipv6=$(ip -6 route show | grep -Ev 'default|unreachable|fe80::/|wan|ppp|utun|iot|peer|docker|podman|virbr|vnet|ovs|vmbr|veth|vmnic|vboxnet|lxcbr|xenbr|vEthernet' | awk '{print $1}' | tr '\n' ' ' | sed 's/ $//') } [ -f "$TMPDIR"/ShellCrash.log ] && break [ -n "$host_ipv4" -a "$ipv6_redir" != "ON" ] && break