]> git.ipfire.org Git - thirdparty/wireguard-go.git/commitdiff
device: do not consume handshake messages if not running
authorJason A. Donenfeld <Jason@zx2c4.com>
Thu, 11 Nov 2021 02:11:29 +0000 (03:11 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Mon, 15 Nov 2021 22:40:47 +0000 (23:40 +0100)
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
device/noise-protocol.go

index 0212b7d42b2abd0f1d537cc4393f73ec7c614906..e31ceda3f3080a4be020b68a62a59a8e07043180 100644 (file)
@@ -282,7 +282,7 @@ func (device *Device) ConsumeMessageInitiation(msg *MessageInitiation) *Peer {
        // lookup peer
 
        peer := device.LookupPeer(peerPK)
-       if peer == nil {
+       if peer == nil || !peer.isRunning.Get() {
                return nil
        }