Fix v5 agent update recovery

Issue: #1515
This commit is contained in:
rcourtman 2026-07-05 10:08:19 +01:00
parent 1ba7bb06a0
commit 314429b879
6 changed files with 176 additions and 14 deletions

View file

@ -127,7 +127,7 @@ func IsLocalNetworkHost(host string) bool {
}
if ip := net.ParseIP(normalized); ip != nil {
return ip.IsPrivate() || ip.IsLinkLocalUnicast()
return ip.IsPrivate() || ip.IsLinkLocalUnicast() || isCarrierGradeNATIPv4(ip)
}
if !strings.Contains(normalized, ".") {
@ -143,6 +143,15 @@ func IsLocalNetworkHost(host string) bool {
return false
}
func isCarrierGradeNATIPv4(ip net.IP) bool {
v4 := ip.To4()
if v4 == nil {
return false
}
return v4[0] == 100 && v4[1] >= 64 && v4[1] <= 127
}
// PulseURLValidationOptions controls optional relaxations for Pulse runtime
// transports. The default zero value preserves the strict production contract.
type PulseURLValidationOptions struct {