From 42eb997ea88f3c8a0ac01a70d58d91336ed5c827 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Thu, 20 Jun 2024 03:20:17 +1000 Subject: [PATCH] revert(connlib): don't return old IPs for DNS resource (#5435) (#5437) This turns out to break things because we can no longer associate a working but outdated IP with the DNS resource. Putting this up here in case we want to merge a fix before we decide on a different one. Reverts: #5435. --- rust/connlib/tunnel/src/client.rs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/rust/connlib/tunnel/src/client.rs b/rust/connlib/tunnel/src/client.rs index 40e30bf2c..fa1460734 100644 --- a/rust/connlib/tunnel/src/client.rs +++ b/rust/connlib/tunnel/src/client.rs @@ -748,17 +748,6 @@ impl ClientState { }) .collect(); - // First, remove all IPs for this particular resource. - { - for (_, resources) in self.dns_resources_internal_ips.values_mut() { - resources.remove(&resource_description); - } - - self.dns_resources_internal_ips - .retain(|_, (_, resources)| !resources.is_empty()); - } - - // Second, add the new IPs. for addr in addrs.clone() { self.dns_resources_internal_ips .entry(addr)