mirror of
https://github.com/tailscale/tailscale.git
synced 2025-01-07 08:07:42 +00:00
cmd/tailscale/cli: fix panic in netcheck print when no DERP home
Fixes #8016 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
9ee173c256
commit
668a0dd5ab
@ -153,7 +153,11 @@ func printReport(dm *tailcfg.DERPMap, report *netcheck.Report) error {
|
|||||||
if len(report.RegionLatency) == 0 {
|
if len(report.RegionLatency) == 0 {
|
||||||
printf("\t* Nearest DERP: unknown (no response to latency probes)\n")
|
printf("\t* Nearest DERP: unknown (no response to latency probes)\n")
|
||||||
} else {
|
} else {
|
||||||
printf("\t* Nearest DERP: %v\n", dm.Regions[report.PreferredDERP].RegionName)
|
if report.PreferredDERP != 0 {
|
||||||
|
printf("\t* Nearest DERP: %v\n", dm.Regions[report.PreferredDERP].RegionName)
|
||||||
|
} else {
|
||||||
|
printf("\t* Nearest DERP: [none]\n")
|
||||||
|
}
|
||||||
printf("\t* DERP latency:\n")
|
printf("\t* DERP latency:\n")
|
||||||
var rids []int
|
var rids []int
|
||||||
for rid := range dm.Regions {
|
for rid := range dm.Regions {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user