Development discussion of WireGuard
 help / color / mirror / Atom feed
* Handshake state collision between parralel RoutineHandshake threads
@ 2020-12-22 10:16 Laura Zelenku
  2021-01-08  6:56 ` Laura Zelenku
  2021-02-25 11:23 ` Jason A. Donenfeld
  0 siblings, 2 replies; 6+ messages in thread
From: Laura Zelenku @ 2020-12-22 10:16 UTC (permalink / raw)
  To: wireguard

Hello devs,
I’m getting errors "handshake initiation must be consumed first” caused by handshake state is not set to HandshakeInitiationConsumed when processing handshake initiation from a peer. The handshake state is changed between “ConsumeMessageInitiation” and “CreateMessageResponse” by processing handshake response from the same peer in different thread.
You know, UDP packet can be delayed or lost mainly from mobile devices with worse mobile signal. After some time (handshake timeout) the peer that initiated connection doesn’t send any handshake (handshake is not delivered) to other side, the other side starts to send its own handshake initiation requests. And now there are both sides sending handshakes.

In a log I’ve found “Received handshake response”, “Received handshake initiation” and “Failed to create response message” on the same time (ms).

Proposals:
1) lower log level of "handshake initiation must be consumed first”
2) start only one RoutineHandshake (not based on nr. of CPUs)
3) extend critical section over whole MessageInitiation processing

thanks and I’m looking forward for following discussions
Laura
-- 
*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] 6+ messages in thread

end of thread, other threads:[~2021-03-23 14:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-22 10:16 Handshake state collision between parralel RoutineHandshake threads Laura Zelenku
2021-01-08  6:56 ` Laura Zelenku
2021-02-25 11:23 ` Jason A. Donenfeld
2021-03-01 14:08   ` Laura Zelenku
2021-03-16 14:03     ` Laura Zelenku
2021-03-23  9:47       ` 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).