Relays always speak directly with peers; enforced RelayRequest msgs (#1980)

* Relays always speak directly with peers; enforce this in RelayRequest messages
This commit is contained in:
brad-defined authored and GitHub committed 2026-10-20 14:00:46 -04:00
1 parent f552cebc51
commit fb2c153dfa
2 files changed
+61

No files matched your search

+4
View File
@@ -528,6 +528,10 @@ func (rm *relayManager) handleCreateRelayRequest(v cert.Version, h *HostInfo, f
if !rm.GetAmRelay() {
return
}
if !slices.Contains(h.vpnAddrs, from) {
logMsg.Info("Discarding relay request where relayFrom is not the sending peer")
return
}
peer := rm.hostmap.QueryVpnAddr(target)
if peer == nil {
// Try to establish a connection to this host. If we get a future relay request,