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:
Dylan Bargatze
2025-07-04 12:48:38 -04:00
committed by GitHub
parent 639fed6856
commit 92a114c66d
4 changed files with 23 additions and 19 deletions

View File

@@ -2602,13 +2602,20 @@ const (
// peer node list.
NodeAttrNativeIPV4 NodeCapability = "native-ipv4"
// NodeAttrRelayServer permits the node to act as an underlay UDP relay
// server. There are no expected values for this key in NodeCapMap.
NodeAttrRelayServer NodeCapability = "relay:server"
// NodeAttrDisableRelayServer prevents the node from acting as an underlay
// UDP relay server. There are no expected values for this key; the key
// only needs to be present in [NodeCapMap] to take effect.
NodeAttrDisableRelayServer NodeCapability = "disable-relay-server"
// NodeAttrRelayClient permits the node to act as an underlay UDP relay
// client. There are no expected values for this key in NodeCapMap.
NodeAttrRelayClient NodeCapability = "relay:client"
// NodeAttrDisableRelayClient prevents the node from allocating UDP relay
// server endpoints itself; the node may still bind into and relay traffic
// using endpoints allocated by its peers. This attribute can be added to
// the node dynamically; if added while the node is already running, the
// node will be unable to allocate UDP relay server endpoints after it next
// updates its network map. There are no expected values for this key in
// [NodeCapMap]; the key only needs to be present in [NodeCapMap] to take
// effect.
NodeAttrDisableRelayClient NodeCapability = "disable-relay-client"
// NodeAttrMagicDNSPeerAAAA is a capability that tells the node's MagicDNS
// server to answer AAAA queries about its peers. See tailscale/tailscale#1152.