Skip to content

Commit 614c612

Browse files
authored
net/netcheck: preserve STUN port defaulting to 3478 (tailscale#14289)
Updates tailscale#14287 Signed-off-by: Irbe Krumina <[email protected]>
1 parent df94a14 commit 614c612

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

net/netcheck/netcheck.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1570,6 +1570,9 @@ func (c *Client) nodeAddrPort(ctx context.Context, n *tailcfg.DERPNode, port int
15701570
if port < 0 || port > 1<<16-1 {
15711571
return zero, false
15721572
}
1573+
if port == 0 {
1574+
port = 3478
1575+
}
15731576
if n.STUNTestIP != "" {
15741577
ip, err := netip.ParseAddr(n.STUNTestIP)
15751578
if err != nil {

0 commit comments

Comments
 (0)