core: 忽略临时 IPv6 地址

This commit is contained in:
bin456789 2024-08-23 00:34:00 +08:00
parent 7edc57c5a3
commit 49420773dd
No known key found for this signature in database
GPG Key ID: EE301B386DE6C11B

View File

@ -1928,7 +1928,7 @@ collect_netconf() {
eval ipv${v}_ethx="$ethx" # can_use_cloud_kernel 要用
eval ipv${v}_mac="$(ip link show dev $ethx | grep link/ether | head -1 | awk '{print $2}')"
eval ipv${v}_gateway="$(ip -$v route show default | awk '$5=="'$ethx'"' | head -1 | awk '{print $3}')"
eval ipv${v}_addr="$(ip -$v -o addr show scope global dev $ethx | head -1 | awk '{print $4}')"
eval ipv${v}_addr="$(ip -$v -o addr show scope global dev $ethx | grep -v temporary | head -1 | awk '{print $4}')"
fi
fi
done