From ac8bff716d5748f521811f011afd62a474add727 Mon Sep 17 00:00:00 2001 From: Juan Font Date: Thu, 24 Nov 2022 15:59:37 +0000 Subject: [PATCH] Call processMachineRoutes when a new Map is received --- protocol_common_poll.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/protocol_common_poll.go b/protocol_common_poll.go index 9eebe921..7df01c86 100644 --- a/protocol_common_poll.go +++ b/protocol_common_poll.go @@ -32,6 +32,15 @@ func (h *Headscale) handlePollCommon( machine.DiscoKey = DiscoPublicKeyStripPrefix(mapRequest.DiscoKey) now := time.Now().UTC() + err := h.processMachineRoutes(machine) + if err != nil { + log.Error(). + Caller(). + Err(err). + Str("machine", machine.Hostname). + Msg("Error processing machine routes") + } + // update ACLRules with peer informations (to update server tags if necessary) if h.aclPolicy != nil { err := h.UpdateACLRules()