From: Laura Zelenku <laura.zelenku@wandera.com>
To: wireguard@lists.zx2c4.com
Subject: Handshake state collision between parralel RoutineHandshake threads
Date: Tue, 22 Dec 2020 11:16:24 +0100 [thread overview]
Message-ID: <27D86318-AED9-49EC-94EE-1FFC806533DC@wandera.com> (raw)
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.
next reply other threads:[~2020-12-22 15:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-22 10:16 Laura Zelenku [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=27D86318-AED9-49EC-94EE-1FFC806533DC@wandera.com \
--to=laura.zelenku@wandera.com \
--cc=wireguard@lists.zx2c4.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).