mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-14 23:17:29 +00:00
types/netmap,wgengine/magicsock: propagate CapVer to magicsock.endpoint (#16244)
This enables us to mark nodes as relay capable or not. We don't actually do that yet, as we haven't established a relay CapVer. Updates tailscale/corp#27502 Signed-off-by: Jordan Whited <jordan@tailscale.com>
This commit is contained in:
@@ -2507,6 +2507,11 @@ func (c *Conn) SetProbeUDPLifetime(v bool) {
|
||||
})
|
||||
}
|
||||
|
||||
func capVerIsRelayCapable(version tailcfg.CapabilityVersion) bool {
|
||||
// TODO(jwhited): implement once capVer is bumped
|
||||
return false
|
||||
}
|
||||
|
||||
// SetNetworkMap is called when the control client gets a new network
|
||||
// map from the control server. It must always be non-nil.
|
||||
//
|
||||
@@ -3203,6 +3208,10 @@ func (c *Conn) UpdateNetmapDelta(muts []netmap.NodeMutation) (handled bool) {
|
||||
ep.mu.Lock()
|
||||
ep.setEndpointsLocked(views.SliceOf(m.Endpoints))
|
||||
ep.mu.Unlock()
|
||||
case netmap.NodeMutationCap:
|
||||
ep.mu.Lock()
|
||||
ep.relayCapable = capVerIsRelayCapable(m.Cap)
|
||||
ep.mu.Unlock()
|
||||
}
|
||||
}
|
||||
return true
|
||||
|
Reference in New Issue
Block a user