mirror of
https://git.zx2c4.com/wireguard-go
synced 2025-10-20 07:24:42 +08:00
device: handshake routine writes into encryption queue
Since RoutineHandshake calls peer.SendKeepalive(), it potentially is a writer into the encryption queue, so we need to bump the wg count. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
@@ -237,7 +237,10 @@ func (device *Device) RoutineDecryption() {
|
||||
/* Handles incoming packets related to handshake
|
||||
*/
|
||||
func (device *Device) RoutineHandshake() {
|
||||
defer device.log.Verbosef("Routine: handshake worker - stopped")
|
||||
defer func() {
|
||||
device.log.Verbosef("Routine: handshake worker - stopped")
|
||||
device.queue.encryption.wg.Done()
|
||||
}()
|
||||
device.log.Verbosef("Routine: handshake worker - started")
|
||||
|
||||
for elem := range device.queue.handshake.c {
|
||||
|
Reference in New Issue
Block a user