Disappointing anti-sticky experiment

This commit is contained in:
Jason A. Donenfeld
2018-05-26 02:59:26 +02:00
parent 2496cdd8e6
commit fc3a7635e5
4 changed files with 22 additions and 29 deletions

View File

@@ -440,10 +440,7 @@ func (device *Device) RoutineHandshake() {
peer.timersAnyAuthenticatedPacketReceived()
// update endpoint
peer.mutex.Lock()
peer.endpoint = elem.endpoint
peer.mutex.Unlock()
peer.SetEndpointFromPacket(elem.endpoint)
logDebug.Println(peer, "- Received handshake initiation")
@@ -473,10 +470,7 @@ func (device *Device) RoutineHandshake() {
}
// update endpoint
peer.mutex.Lock()
peer.endpoint = elem.endpoint
peer.mutex.Unlock()
peer.SetEndpointFromPacket(elem.endpoint)
logDebug.Println(peer, "- Received handshake response")
@@ -549,10 +543,7 @@ func (peer *Peer) RoutineSequentialReceiver() {
}
// update endpoint
peer.mutex.Lock()
peer.endpoint = elem.endpoint
peer.mutex.Unlock()
peer.SetEndpointFromPacket(elem.endpoint)
// check if using new keypair
if peer.ReceivedWithKeypair(elem.keypair) {