Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@thomaseizinger
Copy link
Member

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

@thomaseizinger thomaseizinger requested a review from jamilbk March 16, 2025 03:47
@vercel
Copy link

vercel bot commented Mar 16, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
firezone ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 16, 2025 5:00am

@thomaseizinger

This comment was marked as resolved.

@thomaseizinger

This comment was marked as outdated.

@thomaseizinger thomaseizinger added this pull request to the merge queue Mar 16, 2025
Merged via the queue into main with commit 99624a4 Mar 16, 2025
116 checks passed
@thomaseizinger thomaseizinger deleted the fix/update-tun-device-if-search-domain-changed branch March 16, 2025 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TunConfig is not updated when client IP changes in init

3 participants