feat(healthcheck): HEALTH_ICMP_TARGET_IP -> HEALTH_ICMP_TARGET_IPS
- Specify fallback ICMP IP addresses - Defaults changed from 1.1.1.1 to 1.1.1.1,8.8.8.8 - Small periodic check cycles through addresses as it fails and moves to retry
This commit is contained in:
@@ -31,11 +31,11 @@ func (l *Loop) onTunnelUp(ctx, loopCtx context.Context, data tunnelUpData) {
|
||||
}
|
||||
}
|
||||
|
||||
icmpTarget := l.healthSettings.ICMPTargetIP
|
||||
if icmpTarget.IsUnspecified() {
|
||||
icmpTarget = data.serverIP
|
||||
icmpTargetIPs := l.healthSettings.ICMPTargetIPs
|
||||
if len(icmpTargetIPs) == 1 && icmpTargetIPs[0].IsUnspecified() {
|
||||
icmpTargetIPs = []netip.Addr{data.serverIP}
|
||||
}
|
||||
l.healthChecker.SetConfig(l.healthSettings.TargetAddresses, icmpTarget)
|
||||
l.healthChecker.SetConfig(l.healthSettings.TargetAddresses, icmpTargetIPs)
|
||||
|
||||
healthErrCh, err := l.healthChecker.Start(ctx)
|
||||
l.healthServer.SetError(err)
|
||||
|
||||
Reference in New Issue
Block a user