Development discussion of WireGuard
 help / color / mirror / Atom feed
* [PATCH] Lower log level of 'invalid state for keypair derivation'
@ 2022-02-16 15:30 Laura Zelenku
  0 siblings, 0 replies; only message in thread
From: Laura Zelenku @ 2022-02-16 15:30 UTC (permalink / raw)
  To: WireGuard mailing list

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@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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-16 15:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-16 15:30 [PATCH] Lower log level of 'invalid state for keypair derivation' Laura Zelenku

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).