Skip to content

Commit 9615402

Browse files
committed
Don't connect if DERP is empty
1 parent 9b7c41a commit 9615402

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tailnet/conn.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,9 +344,14 @@ func (c *Conn) UpdateNodes(nodes []*Node) error {
344344
// reason. TODO: @kylecarbs debug this!
345345
KeepAlive: ok && peerStatus.Active,
346346
}
347+
// If no preferred DERP is provided, don't set an IP!
348+
if node.PreferredDERP == 0 {
349+
peerNode.DERP = ""
350+
}
347351
if c.blockEndpoints {
348352
peerNode.Endpoints = nil
349353
}
354+
c.logger.Debug(context.Background(), "adding node", slog.F("node", peerNode))
350355
c.peerMap[node.ID] = peerNode
351356
}
352357
c.netMap.Peers = make([]*tailcfg.Node, 0, len(c.peerMap))

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy