Number of fixes in response to code review

This version cannot complete a handshake.
The program will panic upon receiving any message on the UDP socket.
This commit is contained in:
Mathias Hall-Andersen
2017-08-07 15:25:04 +02:00
parent 8c34c4cbb3
commit cba1d6585a
12 changed files with 551 additions and 444 deletions
+1 -2
View File
@@ -168,8 +168,6 @@ func (device *Device) RoutineReadFromTUN() {
continue
}
println(size, err)
elem.packet = elem.packet[:size]
// lookup peer
@@ -210,6 +208,7 @@ func (device *Device) RoutineReadFromTUN() {
// insert into nonce/pre-handshake queue
signalSend(peer.signal.handshakeReset)
addToOutboundQueue(peer.queue.nonce, elem)
elem = nil