mirror of
https://github.com/slackhq/nebula.git
synced 2026-11-16 21:36:52 +01:00
Send by the relay when hybrid msg3 came by one, the direct address learned from msg1 may only work toward us
This commit is contained in:
1 parent
bd82089a3f
commit
437d47ffc5
2 files changed
+62
No files matched your search
@@ -255,9 +255,14 @@ func (hm *HandshakeManager) completeHybridResponder(via ViaSender, hh *Handshake
|
||||
hostinfo.ConnectionState = cs
|
||||
hostinfo.remoteIndexId = result.RemoteIndex
|
||||
hostinfo.lastHandshakeTime = result.HandshakeTime
|
||||
// The initiator sends msg3 by the path its msg2 got through, so that path
|
||||
// works both ways: send by it. A relayed msg3 also means the direct address
|
||||
// learned from msg1 may only work toward us, so forget it and let traffic,
|
||||
// the confirmation first, go by the relay.
|
||||
if !via.IsRelayed {
|
||||
hostinfo.SetRemote(via.UdpAddr)
|
||||
} else {
|
||||
hostinfo.remote.Store(nil)
|
||||
hostinfo.relayState.InsertRelayTo(via.relayHI.vpnAddrs[0])
|
||||
}
|
||||
remoteCert := result.RemoteCert
|
||||
|
||||
Reference in new issue
Block a user