mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 18:18:55 +00:00
When adding a new Resource that has the same address as a previous Resource, we would fail to call `emit_resources_changed`, and the Resource would fail to show up in the client's resource list. This happened because we essentially didn't consider "activating" the resource if the resource address didn't change. With this PR, we always do the following: - DNS Resource: Add address to the stub resolver -> no-op if address exists - CIDR Resource: `maybe_update_cidr_resources` -> no-op if duplicate CIDR is added - Internet Resource: No-op if resource ID doesn't change (it shouldn't ever) Since we remove the early-exit logic, the `maybe_update_tun_routes` and `emit_resources_changed` is always called. `maybe_update_tun_routes` is a no-op if the address hasn't changed, so the early-exit logic to avoid calling that seems to be redundant. ## Tested: - [x] Adding / removing a resource - [x] Updating a resource's fields individually, observing the client resource updates properly - [x] Adding two CIDR resources with the same address, observing that the routing table _was not updated_ (thus no disruption to packet flows). Fixes #8100
Connlib
Firezone's connectivity library shared by all clients.
Building Connlib
You shouldn't need to build connlib directly; it's typically built as a dependency of one of the other Firezone components. See READMEs in those directories for relevant instructions.