wgengine/magicsock: generate relay server set from tailnet policy (#16331)

Updates tailscale/corp#27502

Signed-off-by: Jordan Whited <jordan@tailscale.com>
This commit is contained in:
Jordan Whited
2025-06-20 15:00:28 -07:00
committed by GitHub
parent 12e92b1b08
commit d3bb34c628
4 changed files with 386 additions and 24 deletions

View File

@@ -4,10 +4,12 @@
package magicsock
import (
"net/netip"
"testing"
"tailscale.com/disco"
"tailscale.com/types/key"
"tailscale.com/util/set"
)
func TestRelayManagerInitAndIdle(t *testing.T) {
@@ -26,4 +28,8 @@ func TestRelayManagerInitAndIdle(t *testing.T) {
rm = relayManager{}
rm.handleGeneveEncapDiscoMsgNotBestAddr(&disco.BindUDPRelayEndpointChallenge{}, &discoInfo{}, epAddr{})
<-rm.runLoopStoppedCh
rm = relayManager{}
rm.handleRelayServersSet(make(set.Set[netip.AddrPort]))
<-rm.runLoopStoppedCh
}