cmd/tailscale: make netcheck work when logged out

Fixes #2993

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
pull/2997/head
Brad Fitzpatrick 3 years ago
parent 58e1475ec7
commit 2d464cecd1

@ -64,7 +64,11 @@ func runNetcheck(ctx context.Context, args []string) error {
} }
dm, err := tailscale.CurrentDERPMap(ctx) dm, err := tailscale.CurrentDERPMap(ctx)
if err != nil { noRegions := dm != nil && len(dm.Regions) == 0
if noRegions {
log.Printf("No DERP map from tailscaled; using default.")
}
if err != nil || noRegions {
dm, err = prodDERPMap(ctx, http.DefaultClient) dm, err = prodDERPMap(ctx, http.DefaultClient)
if err != nil { if err != nil {
return err return err

Loading…
Cancel
Save