mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-26 11:35:35 +00:00
cmd/tailscale: make netcheck work when logged out
Fixes #2993 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
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…
Reference in New Issue
Block a user