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.
This commit is contained in:
Thomas Eizinger
2025-08-06 21:26:51 +10:00
committed by GitHub
parent 2dde3b8573
commit 507a8957c2

View File

@@ -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) {