Update libimobiledevice to fix IPv6 scope ID lookup - #1774
Draft
Minaduki-Shigure wants to merge 1 commit into
Draft
Update libimobiledevice to fix IPv6 scope ID lookup#1774Minaduki-Shigure wants to merge 1 commit into
Minaduki-Shigure wants to merge 1 commit into
Conversation
Point AltStore at the backport of libimobiledevice-glue dd242cb so IPv6 interface lookup does not assume monotonically ordered scope IDs.
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
Update the pinned
libimobiledevicesubmodule to include the IPv6 scope-ID lookup fix from rileytestut/libimobiledevice#1.Dependency status
This PR depends on rileytestut/libimobiledevice#1 and is intentionally opened as a draft. The current gitlink points to that PR's head commit,
af92832ca7bb28dc7d2b7a69367bd021ce86fbf2. It will remain a draft until this commit, or the maintainer's replacement commit, is reachable fromrileytestut/libimobiledevice:master.Problem
AltServer can fail to open Wi-Fi-connected iOS devices on Macs with multiple active IPv6 interfaces. The device may still appear in
usbmuxd, and its link-local address may be directly reachable on Lockdown TCP port 62078, while AltServer pauses and ultimately produces an empty device list.From AltStore, this can surface as a refresh failure reporting that AltStore could not connect to AltServer.
Root cause
The pinned
libimobiledevicerevision assumes that IPv6 interface scope IDs returned bygetifaddrs()are numerically ordered. They are not required to be ordered.When the requested scope ID appears after a larger interface index, the old lookup exits early and can apply the previous interface's scope ID to the device's link-local IPv6 address. The resulting Lockdown connection is attempted on the wrong interface.
Solution
Advance
Dependencies/libimobiledevicefrom9b98387dd8c78a3db388f10d0ac9bf980bbab777toaf92832ca7bb28dc7d2b7a69367bd021ce86fbf2, currently the head of rileytestut/libimobiledevice#1. If that PR is rebased or squashed, this gitlink will be updated to the resulting upstream commit before this PR is marked ready.The dependency change removes the invalid greater-than early exits while retaining the exact scope-ID match exit. It backports libimobiledevice/libimobiledevice-glue@dd242cb.
Why update the dependency
libimobiledevice.libimobiledevice-glueimplementation.Validation
Dependencies/libimobiledeviceat the expected revision.Regression harness:
Minaduki-Shigure/AltStore:test/libimobiledevice-scope-id-backportScope and risk
This PR changes only the
libimobiledevicegitlink. The dependency fix is limited to IPv6 scope-ID selection for socket connections; USB, IPv4, and global IPv6 paths are unchanged.Authorship and provenance
This pull request description and the submitted submodule integration were authored by OpenAI Codex under the direction of Minaduki Shigure. OpenAI Codex also authored the regression harness and performed the local validation.
The underlying socket fix was originally authored by Nikias Bassen in
libimobiledevice-gluecommitdd242cband is being brought into the pinned dependency through rileytestut/libimobiledevice#1.