net/netcheck: preserve STUN port defaulting to 3478 (#14289)

Updates tailscale/tailscale#14287

Signed-off-by: Irbe Krumina <irbe@tailscale.com>
pull/14291/head
Irbe Krumina 1 year ago committed by GitHub
parent df94a14870
commit 614c612643
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1570,6 +1570,9 @@ func (c *Client) nodeAddrPort(ctx context.Context, n *tailcfg.DERPNode, port int
if port < 0 || port > 1<<16-1 {
return zero, false
}
if port == 0 {
port = 3478
}
if n.STUNTestIP != "" {
ip, err := netip.ParseAddr(n.STUNTestIP)
if err != nil {

Loading…
Cancel
Save