test(connlib): fix race condition of WireGuard handshakes (#7839)

The committed regression seeds trigger a scenario where the WireGuard
sessions of the peers expire in a way where by the time the Client sends
the packet, it is still active (179.xx seconds old) and with the latency
to the Gateway, the 180s mark is reached and the Gateway clears the
session and discards the packet as a result.

In order to fix this, I opted to patch WireGuard by introducing a new
timer that does not allow the initiator to use a session that is almost
expired: https://github.com/firezone/boringtun/pull/68.

Resolves: #7832.

---------

Signed-off-by: Thomas Eizinger <thomas@eizinger.io>
This commit is contained in:
Thomas Eizinger
2025-01-24 13:42:43 +11:00
committed by GitHub
parent 1e5599e5fc
commit 71b1edfb70
2 changed files with 3 additions and 1 deletions

2
rust/Cargo.lock generated
View File

@@ -608,7 +608,7 @@ dependencies = [
[[package]]
name = "boringtun"
version = "0.6.0"
source = "git+https://github.com/firezone/boringtun?branch=master#5128b9c139b2e0b83a1cee2a185223b5368e7566"
source = "git+https://github.com/firezone/boringtun?branch=master#935d9ec7f96d9602d8e4b76721dfc8dc1bec863c"
dependencies = [
"aead",
"base64 0.22.1",

View File

@@ -152,3 +152,5 @@ cc 1bf5026c041ce75acf4ee89fe3fb9a7ccaa09c8ec16ff25f806b615adccdabad
cc 1934adc00a03acf573e466039f4b84fea5a927e73dc983f7953925756d1af504
cc 4b092a98e21cc8dcccb54968b2a29b66b99ed23cb258208716b2ceb8b61d0faf
cc 893e70e809ad210d5ed7aab465bda2dbf2c8c472e6bdf63e66812fa238dd8966
cc 3a21d576c6ab4baded47975d9e4acf91303c32a1d679ebdc6e6f5bc029712e3c
cc 737a635b47b3b7fa128e9adbe5d45e18ea97b5633841b1616dedc0ccf8b61d16