8000 `TunConfig` is not updated when client IP changes in `init` · Issue #8451 · firezone/firezone · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

TunConfig is not updated when client IP changes in init #8451

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jamilbk opened this issue Mar 16, 2025 · 0 comments · Fixed by #8453
Closed

TunConfig is not updated when client IP changes in init #8451

jamilbk opened this issue Mar 16, 2025 · 0 comments · Fixed by #8453
Labels
area/connlib Firezone's core connectivity library kind/bug Something isn't working

Comments

@jamilbk
Copy link
Member
jamilbk commented Mar 16, 2025

Not a major problem since the chance of this happening is low, but I noticed we never apply this change when it comes in from the portal in init because of the complex logic we have around state updates and tun config.

@jamilbk jamilbk added area/connlib Firezone's core connectivity library kind/bug Something isn't working labels Mar 16, 2025
github-merge-queue bot pushed a commit that referenced this issue Mar 16, 2025
Currently, we are only emitting updates to the `TunConfig` when the
routes or the DNS servers change. This isn't correct, we should also
emit updates for it when the IPs or the search-domain changes.

In order to achieve that, we create a new `TunConfig` based on the
existing one every time we receive an `InterfaceConfig` update.
Depending on our current state, we may create an entirely new
`TunConfig` or create a new one where we copy the fields in from the new
`InterfaceConfig`. We then unconditionally call
`maybe_update_tun_config` which does the necessary work to only emit
updates when things actually changed.

To ensure this works in all cases and the latest update is always
reflected on the TUN device, we also extend the proptests to assert the
latest search domain.

Fixes: #8451
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connlib Firezone's core connectivity library kind/bug Something isn't working
Projects
None yet
1 participant
0