fix(network): recover managed networking after path changes - #28
Closed
Afcoo wants to merge 4 commits into
Closed
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Recover the complete managed networking configuration after macOS network-path changes such as enabling Wi-Fi or connecting and disconnecting Ethernet.
Changes
NWPathMonitor, ignore the initial snapshot, and coalesce bursts before checking managed networking state./1routes together with the effective primary service/interface and global DNS.statusandstartXPC surface so the helper can repair the current configuration without adding a privileged operation.192.168.100.1when the recorded topology is still valid./1routes while preserving unrelated routes and rejecting partial conflicts.origin/maindebug routing controls and use build 22 for this distinct helper-containing update.Related issue
None.
Validation
./script/build_and_run.sh --verifygit diff --checkplutil -lintfor the project, property lists, and entitlementsxmllint --nooutfor shared schemesjq emptyfor the string catalogbash -nfor project shell scripts/Applications/Xcode-beta.app/Contents/Developer/usr/bin/xcodebuild -project ThruRNDIS.xcodeproj -scheme ThruRNDIS -configuration Debug -destination platform=macOS -derivedDataPath /tmp/ThruRNDIS-DerivedData -disableAutomaticPackageResolution CODE_SIGNING_ALLOWED=NO build./script/build_and_install.shThe app was not launched during unsigned validation. Local signing configuration and real RNDIS hardware were unavailable, so signed helper replacement and live Wi-Fi/Ethernet recovery of routes, the effective primary service, and global DNS remain unverified.
User-facing impact
While managed networking is active, ThruRNDIS now checks and restores its
/1routes, effective primary service/interface, and global DNS after macOS network-path changes. Network Routing status can briefly show Checking or Repairing. There is no new setting or layout change, so no screenshot is included.Security and architecture
The XPC surface remains limited to
status,start, andstop. The app never runs administrative networking commands. The helper repairs only the authenticated active lease and exact recorded topology, does not write configd-owned Dynamic StoreState:keys, rejects conflicting routes, and never replaces or deletes unrelated network configuration.Checklist
fix(usb): serialize detach handling.Afcoo/ThruRNDIS_VM_Assets.