mirror of
https://github.com/slackhq/nebula.git
synced 2026-11-17 11:16:52 +01:00
Keep a hybrid responder's reassembled msg1 rather than a copy of it
This commit is contained in:
1 parent
e8d6cd9b58
commit
a3dc54b012
1 file changed
+3
-2
@@ -145,8 +145,9 @@ func (hm *HandshakeManager) awaitMsg3(via ViaSender, hh *HandshakeHostInfo, mach
|
|||||||
now := time.Now()
|
now := time.Now()
|
||||||
hostinfo.vpnAddrs = vpnAddrs
|
hostinfo.vpnAddrs = vpnAddrs
|
||||||
hostinfo.remoteIndexId = rh.RemoteIndex
|
hostinfo.remoteIndexId = rh.RemoteIndex
|
||||||
// packet aliases the listener's incoming buffer, so this copy must stay.
|
// A hybrid msg1 is always fragmented, so packet is the one the fragment
|
||||||
hostinfo.HandshakePacket[handshakePacketStage0] = append([]byte(nil), packet[header.Len:]...)
|
// table reassembled, not the listener's buffer, and nothing else holds it.
|
||||||
|
hostinfo.HandshakePacket[handshakePacketStage0] = packet[header.Len:]
|
||||||
hostinfo.HandshakePacket[handshakePacketStage2] = response
|
hostinfo.HandshakePacket[handshakePacketStage2] = response
|
||||||
hostinfo.remotes = f.lightHouse.QueryCache(vpnAddrs)
|
hostinfo.remotes = f.lightHouse.QueryCache(vpnAddrs)
|
||||||
if !via.IsRelayed {
|
if !via.IsRelayed {
|
||||||
|
|||||||
Reference in new issue
Block a user