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

@ -63,6 +63,7 @@ func (h *Headscale) handlePoll(
node *types.Node,
mapRequest tailcfg.MapRequest,
isNoise bool,
capVer tailcfg.CapabilityVersion,
) {
logInfo, logErr := logPollFunc(mapRequest, node, isNoise)
@ -130,7 +131,7 @@ func (h *Headscale) handlePoll(
// The intended use is for clients to discover the DERP map at
// start-up before their first real endpoint update.
} else if mapRequest.OmitPeers && !mapRequest.Stream && mapRequest.ReadOnly {
h.handleLiteRequest(writer, node, mapRequest, isNoise)
h.handleLiteRequest(writer, node, mapRequest, isNoise, capVer)
return
} else if mapRequest.OmitPeers && mapRequest.Stream {
@ -163,6 +164,7 @@ func (h *Headscale) handlePoll(
peers,
h.privateKey2019,
isNoise,
capVer,
h.DERPMap,
h.cfg.BaseDomain,
h.cfg.DNSConfig,
@ -383,6 +385,7 @@ func (h *Headscale) handleLiteRequest(
node *types.Node,
mapRequest tailcfg.MapRequest,
isNoise bool,
capVer tailcfg.CapabilityVersion,
) {
logInfo, logErr := logPollFunc(mapRequest, node, isNoise)
@ -393,6 +396,7 @@ func (h *Headscale) handleLiteRequest(
types.Nodes{},
h.privateKey2019,
isNoise,
capVer,
h.DERPMap,
h.cfg.BaseDomain,
h.cfg.DNSConfig,