Upgrade Go 1.21, Tailscale 1.50 and add Capability version support (#1563)

This commit is contained in:
Kristoffer Dalby 2023-09-28 12:33:53 -07:00 committed by GitHub
parent 01b85e5232
commit fb4ed95ff6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 277 additions and 132 deletions

View file

@ -93,5 +93,16 @@ func (h *Headscale) PollNetMapHandler(
Str("node", node.Hostname).
Msg("A node is sending a MapRequest via legacy protocol")
h.handlePoll(writer, req.Context(), node, mapRequest, false)
capVer, err := parseCabailityVersion(req)
if err != nil && !errors.Is(err, ErrNoCapabilityVersion) {
log.Error().
Caller().
Err(err).
Msg("failed to parse capVer")
http.Error(writer, "Internal error", http.StatusInternalServerError)
return
}
h.handlePoll(writer, req.Context(), node, mapRequest, false, capVer)
}