Skip to content
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.

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

Detect changes to interfaces in the dynamic store #5254

Merged
merged 8 commits into from
Oct 10, 2023
Merged

Conversation

dlon
Copy link
Member

@dlon dlon commented Oct 9, 2023

This PR makes a few changes:

  • Use the primary interface as the "best (scoped) default route", or else the first active interface in the network service order. (Same as before, but the flow is much easier to understand.)
  • Check whether the "best default route" has changed in response to any changes to network services in the dynamic store.
  • Check whether the "best default route" has changed when the user tries to connect in the offline state.
  • Log all the things.

Fix DES-398
Fix DES-396


This change is Reviewable

@dlon dlon requested review from pinkisemils and Jontified October 9, 2023 14:49
@dlon dlon force-pushed the macos-detect-sc-changes branch 5 times, most recently from ed95be6 to 4d83f78 Compare October 9, 2023 17:15
@linear
Copy link

linear bot commented Oct 9, 2023

DES-396 SCDynamicStoreBuilder panics during shutdown

DES-398 App gets stuck in offline state

My best guess is that we must react to dynamic store key changes.

@dlon dlon force-pushed the macos-detect-sc-changes branch from 4d83f78 to 1f12dfe Compare October 9, 2023 17:39
Copy link
Collaborator

@pinkisemils pinkisemils left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 7 files at r1, 4 of 6 files at r2, 3 of 3 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved


talpid-core/src/offline/macos.rs line 112 at r3 (raw file):

                route_event = route_listener.next() => {
                    let Some(event) = route_event else {
                        break;

Should it break or continue in this case? Feels like this could be coalesced with let Some(state) = weak_state.ugprade()... here.

Copy link
Member Author

@dlon dlon left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved


talpid-core/src/offline/macos.rs line 112 at r3 (raw file):

Previously, pinkisemils (Emīls Piņķis) wrote…

Should it break or continue in this case? Feels like this could be coalesced with let Some(state) = weak_state.ugprade()... here.

Definitely break -- this should only return none when the route manager is down.

@dlon dlon force-pushed the macos-detect-sc-changes branch from 00fa03a to 65b00ba Compare October 10, 2023 09:34
@dlon dlon merged commit 3bed86d into main Oct 10, 2023
26 checks passed
@dlon dlon deleted the macos-detect-sc-changes branch October 10, 2023 09:41
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.

2 participants