net/netcheck: don't panic if a region has no Nodes

Updates #13728

Signed-off-by: Andrew Dunham <andrew@du.nham.ca>
Change-Id: I1e8319d6b2da013ae48f15113b30c9333e69cc0b
This commit is contained in:
Andrew Dunham 2024-10-08 12:27:00 -04:00
parent 36cb2e4e5f
commit 8ee7f82bf4

View File

@ -503,6 +503,10 @@ func makeProbePlanInitial(dm *tailcfg.DERPMap, ifState *netmon.State) (plan prob
plan = make(probePlan) plan = make(probePlan)
for _, reg := range dm.Regions { for _, reg := range dm.Regions {
if len(reg.Nodes) == 0 {
continue
}
var p4 []probe var p4 []probe
var p6 []probe var p6 []probe
for try := 0; try < 3; try++ { for try := 0; try < 3; try++ {