From 507a8957c2f71432c30fcc273a03d2ddb77832df Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Wed, 6 Aug 2025 21:26:51 +1000 Subject: [PATCH] chore(connlib): only debug-assert non-retransmitted DNS queries (#10136) When we receive the same TCP DNS query twice, we currently wrongly hit a debug assert. --- rust/connlib/tunnel/src/client.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rust/connlib/tunnel/src/client.rs b/rust/connlib/tunnel/src/client.rs index e6091924b..56ee2b7d2 100644 --- a/rust/connlib/tunnel/src/client.rs +++ b/rust/connlib/tunnel/src/client.rs @@ -1357,7 +1357,11 @@ impl ClientState { .tcp_dns_streams_by_upstream_and_query_id .insert((server, query_id), (query.local, query.remote)); - debug_assert!(existing.is_none(), "Query IDs should be unique"); + if let Some((existing_local, existing_remote)) = existing + && (existing_local != query.local || existing_remote != query.remote) + { + debug_assert!(false, "Query IDs should be unique"); + } } fn maybe_update_tun_routes(&mut self) {