From c290ccf3884bfd31aa0605455941a35ccd24b6bf Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Tue, 16 Jun 2020 11:41:56 +0200 Subject: [PATCH] cmd/tailscale: note that seamless VPN tunnel handover works on Android But not on ChromeOS, and I haven't found a robust way to detect ChromeOS. Signed-off-by: Elias Naur --- cmd/tailscale/backend.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmd/tailscale/backend.go b/cmd/tailscale/backend.go index 9142f62..8e68a98 100644 --- a/cmd/tailscale/backend.go +++ b/cmd/tailscale/backend.go @@ -122,7 +122,14 @@ func (b *backend) setCfg(cfg *router.Config) error { } func (b *backend) updateTUN(service jni.Object, cfg *router.Config) error { + // Close previous tunnel(s). + // This is necessary for ChromeOS, native Android devices + // seem to handle seamless handover between tunnels correctly. + // + // TODO(eliasnaur): If seamless handover becomes a desirable feature, skip + // the closing on ChromeOS. b.CloseTUNs() + if reflect.DeepEqual(cfg, b.lastCfg) { return nil }