mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-13 22:47:30 +00:00
tailcfg, feature/relayserver, wgengine/magicsock: invert UDP relay server nodeAttrs (#16444)
Inverts the nodeAttrs related to UDP relay client/server enablement to disablement, and fixes up the corresponding logic that uses them. Also updates the doc comments on both nodeAttrs. Fixes tailscale/corp#30024 Signed-off-by: Dylan Bargatze <dylan@tailscale.com>
This commit is contained in:
@@ -2703,7 +2703,7 @@ func (c *Conn) onNodeViewsUpdate(update NodeViewsUpdate) {
|
||||
peersChanged := c.updateNodes(update)
|
||||
|
||||
relayClientEnabled := update.SelfNode.Valid() &&
|
||||
update.SelfNode.HasCap(tailcfg.NodeAttrRelayClient) &&
|
||||
!update.SelfNode.HasCap(tailcfg.NodeAttrDisableRelayClient) &&
|
||||
envknob.UseWIPCode()
|
||||
|
||||
c.mu.Lock()
|
||||
|
@@ -3408,9 +3408,6 @@ func Test_peerAPIIfCandidateRelayServer(t *testing.T) {
|
||||
}
|
||||
peerOnlyIPv4 := &tailcfg.Node{
|
||||
Cap: math.MinInt32,
|
||||
CapMap: map[tailcfg.NodeCapability][]tailcfg.RawMessage{
|
||||
tailcfg.NodeAttrRelayServer: nil,
|
||||
},
|
||||
Addresses: []netip.Prefix{
|
||||
netip.MustParsePrefix("2.2.2.2/32"),
|
||||
},
|
||||
|
Reference in New Issue
Block a user