[PATCH] Lower log level of 'invalid state for keypair derivation'
Laura Zelenku
laura.zelenku at wandera.com
Wed Feb 16 15:30:08 UTC 2022
Error is caused by multiple handshakes processing in the same time for
the same peer.
Invalid state is not harmful for a peer and the other/faster handshake wins.
Signed-off-by: Laura Zelenku <laura.zelenku at wandera.com>
---
device/receive.go | 3 +--
device/send.go | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/device/receive.go b/device/receive.go
index cc34498..25fb7d9 100644
--- a/device/receive.go
+++ b/device/receive.go
@@ -379,9 +379,8 @@ func (device *Device) RoutineHandshake(id int) {
// derive keypair
err = peer.BeginSymmetricSession()
-
if err != nil {
- device.log.Errorf("%v - Failed to
derive keypair: %v", peer, err)
+ device.log.Verbosef("%v - Failed to
derive keypair: %v", peer, err)
goto skip
}
diff --git a/device/send.go b/device/send.go
index 0a7135f..9598bee 100644
--- a/device/send.go
+++ b/device/send.go
@@ -156,7 +156,7 @@ func (peer *Peer) SendHandshakeResponse() error {
err = peer.BeginSymmetricSession()
if err != nil {
- peer.device.log.Errorf("%v - Failed to derive keypair:
%v", peer, err)
+ peer.device.log.Verbosef("%v - Failed to derive
keypair: %v", peer, err)
return err
}
--
2.30.1 (Apple Git-130)
--
*IMPORTANT NOTICE*: This email, its attachments and any rights attaching
hereto are confidential and intended exclusively for the person to whom the
email is addressed. If you are not the intended recipient, do not read,
copy, disclose or use the contents in any way. Wandera accepts no liability
for any loss, damage or consequence resulting directly or indirectly from
the use of this email and attachments.
More information about the WireGuard
mailing list