diff --git a/hscontrol/derp/derp.go b/hscontrol/derp/derp.go index 839de9b5..479bfe5c 100644 --- a/hscontrol/derp/derp.go +++ b/hscontrol/derp/derp.go @@ -82,6 +82,12 @@ func mergeDERPMaps(derpMaps []*tailcfg.DERPMap) *tailcfg.DERPMap { maps.Copy(result.Regions, derpMap.Regions) } + for id, region := range result.Regions { + if region == nil { + delete(result.Regions, id) + } + } + return &result }