From 71b1edfb70faa602e0bea4d0c4dca2d6d3adc242 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Fri, 24 Jan 2025 13:42:43 +1100 Subject: [PATCH] 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 --- rust/Cargo.lock | 2 +- rust/connlib/tunnel/proptest-regressions/tests.txt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 8c376dd3c..612e7d3b1 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -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", diff --git a/rust/connlib/tunnel/proptest-regressions/tests.txt b/rust/connlib/tunnel/proptest-regressions/tests.txt index ab4b50779..9279f3b1c 100644 --- a/rust/connlib/tunnel/proptest-regressions/tests.txt +++ b/rust/connlib/tunnel/proptest-regressions/tests.txt @@ -152,3 +152,5 @@ cc 1bf5026c041ce75acf4ee89fe3fb9a7ccaa09c8ec16ff25f806b615adccdabad cc 1934adc00a03acf573e466039f4b84fea5a927e73dc983f7953925756d1af504 cc 4b092a98e21cc8dcccb54968b2a29b66b99ed23cb258208716b2ceb8b61d0faf cc 893e70e809ad210d5ed7aab465bda2dbf2c8c472e6bdf63e66812fa238dd8966 +cc 3a21d576c6ab4baded47975d9e4acf91303c32a1d679ebdc6e6f5bc029712e3c +cc 737a635b47b3b7fa128e9adbe5d45e18ea97b5633841b1616dedc0ccf8b61d16