mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-21 18:42:36 +00:00
cmd/tailscaled, ipn/ipnlocal, wgengine: shutdown tailscaled if wgdevice is closed
Tailscaled becomes inoperative if the Tailscale Tunnel wintun adapter is abruptly removed. wireguard-go closes the device in case of a read error, but tailscaled keeps running. This adds detection of a closed WireGuard device, triggering a graceful shutdown of tailscaled. It is then restarted by the tailscaled watchdog service process. Fixes #11222 Signed-off-by: Nick Khyl <nickk@tailscale.com>
This commit is contained in:
@@ -89,10 +89,11 @@ type Engine interface {
|
||||
// new Engine.
|
||||
Close()
|
||||
|
||||
// Wait waits until the Engine's Close method is called or the
|
||||
// engine aborts with an error. You don't have to call this.
|
||||
// TODO: return an error?
|
||||
Wait()
|
||||
// Done returns a channel that is closed when the Engine's
|
||||
// Close method is called, the engine aborts with an error,
|
||||
// or it shuts down due to the closure of the underlying device.
|
||||
// You don't have to call this.
|
||||
Done() <-chan struct{}
|
||||
|
||||
// SetNetworkMap informs the engine of the latest network map
|
||||
// from the server. The network map's DERPMap field should be
|
||||
|
Reference in New Issue
Block a user