Merge pull request #2075 from lukaszgoworko/fix-#2060-invalid-ipv6-value

Fix #2060 invalid ipv6 value
This commit is contained in:
Tobias Knöppler 2025-10-18 13:26:40 +00:00 committed by GitHub
commit b4210d4ee9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11,9 +11,12 @@ done
# wicd service finishes before completing DHCP
while :; do
local_ip="$(get_ip)"
pub_ip="$(curl -m4 icanhazip.com 2>/dev/null)"
[[ "$pub_ip" != "" ]] && ncc config:system:set trusted_domains 11 --value="$pub_ip"
pub_ipv4="$(curl -4 -m4 icanhazip.com 2>/dev/null)"
pub_ipv6="$(curl -6 -m4 icanhazip.com 2>/dev/null)"
[[ -z "$pub_ipv4" ]] || ncc config:system:set trusted_domains 11 --value="$pub_ipv4"
[[ -z "$pub_ipv6" ]] || ncc config:system:set trusted_domains 12 --value="[$pub_ipv6]"
[[ "$local_ip" != "" ]] && break
sleep 3