diff --git a/net/netcheck/netcheck.go b/net/netcheck/netcheck.go index d8f5e1d49..7930f88f6 100644 --- a/net/netcheck/netcheck.go +++ b/net/netcheck/netcheck.go @@ -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 {