control,health,ipn: move IP forwarding check to health tracker (#19007)
Currently IP forwarding health check is done on sending MapRequests. Move ip forwarding to the health service to gain the benefits of the health tracker and perodic monitoring out of band from the MapRequest path. ipnlocal now provides a closure to the health service to provide the check if forwarding is broken. Removed `skipIPForwardingCheck` from controlclient/direct.go, it wasn't being used as the comments describe it, that check has moved to ipnlocal for the closure to the health tracker. Updates #18976 Signed-off-by: Mike O'Driscoll <mikeo@tailscale.com>
This commit is contained in:
@@ -298,3 +298,16 @@ var warmingUpWarnable = condRegister(func() *Warnable {
|
||||
Text: StaticMessage("Tailscale is starting. Please wait."),
|
||||
}
|
||||
})
|
||||
|
||||
// ipForwardingWarnable is a Warnable that warns the user that IP forwarding is disabled
|
||||
// but subnet routing or exit node functionality is being used.
|
||||
var ipForwardingWarnable = condRegister(func() *Warnable {
|
||||
return &Warnable{
|
||||
Code: "ip-forwarding-off",
|
||||
Title: "IP forwarding is off",
|
||||
Severity: SeverityMedium,
|
||||
MapDebugFlag: "warn-ip-forwarding-off",
|
||||
Text: StaticMessage("Subnet routing is enabled, but IP forwarding is disabled. Check that IP forwarding is enabled on your machine."),
|
||||
ImpactsConnectivity: true,
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user