Merge local DERP server region with other configured DERP sources

This commit is contained in:
Juan Font Alonso 2022-03-05 20:04:31 +01:00
parent e78c002f5a
commit 54c3e00a1f
3 changed files with 58 additions and 52 deletions

View file

@ -148,6 +148,7 @@ func (h *Headscale) scheduledDERPMapUpdateWorker(cancelChan <-chan struct{}) {
case <-ticker.C:
log.Info().Msg("Fetching DERPMap updates")
h.DERPMap = GetDERPMap(h.cfg.DERP)
h.DERPMap.Regions[h.DERPServer.region.RegionID] = &h.DERPServer.region
namespaces, err := h.ListNamespaces()
if err != nil {