Skip to content

fix(connlib): only emit route changes from disabled_resource if routes actually changed - #6424

Merged
conectado merged 5 commits into
mainfrom
fix/connlib/dont-over-emit-on-update-routes
Aug 23, 2024
Merged

conectado merged 5 commits into
mainfrom
fix/connlib/dont-over-emit-on-update-routes

Conversation

@conectado

@conectado conectado commented Aug 23, 2024 •

Copy link
Copy Markdown
Contributor

Right now, whenever a connection is established we update the site status.

In order to do that, we call on_update_resources, when on_update_resources is called this in turn calls set_disabled_resources, since we apply from the application side the "disabled" given the current resources.

set_disabled_resources currently, always call on_update_routes, which causes connectivity issues on Android and MacOS, since the packets aren't correctly routed when the routes are changed.

To fix this we make set_disabled_resources only emit the routes when they have actually changed.

Fixes: #6387.

@vercel

vercel Bot commented Aug 23, 2024 •

Copy link
Copy Markdown

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 Aug 23, 2024 3:29am

Comment thread rust/connlib/tunnel/src/client.rs Outdated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thomaseizinger I'd like your input on this, we can either make set_disabled_resources return something to indicate that the routes must be updated or we do it from here, that's not tested for now.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine for now. We are gonna redesign these events later.

@thomaseizinger thomaseizinger left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should have a changelog entry.

@conectado
conectado enabled auto-merge August 23, 2024 01:44

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should include the same one on Android, no?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's more of a theoretical thing in android right now, I think, we never saw it.

Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
Signed-off-by: Gabi <gabrielalejandro7@gmail.com>
@conectado
conectado added this pull request to the merge queue Aug 23, 2024
Merged via the queue into main with commit 7345cc2 Aug 23, 2024
@conectado
conectado deleted the fix/connlib/dont-over-emit-on-update-routes branch August 23, 2024 04:34

This branch was successfully deployed

1 active deployment
Preview — 919cee7f Deployed Aug 23, 2024 by vercel[bot]
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.

Packets briefly routed outside of tunnel during connection establishment

3 participants