Repository navigation
android: fall back to IPv6 when pinging a peer - #910
Open
PaarthShah wants to merge 1 commit into
Open
PaarthShah wants to merge 1 commit into
PaarthShah wants to merge 1 commit into
Conversation
Client.ping only used the peer's primary IPv4 address and failed with "No IP address for peer" when there wasn't one, so the ping view never worked in IPv6-only tailnets. Fall back to the primary IPv6 address, as PeerView already does for the peer's subtitle. Fixes tailscale/tailscale#22125 Signed-off-by: Paarth Shah <mail@shahpaarth.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PaarthShah
force-pushed
the
ping-ipv6-fallback
branch
from
November 2, 2026 02:12
b917fd7 to
5ea74f3
Compare
PaarthShah
marked this pull request as ready for review
November 2, 2026 02:13
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.
Fixes tailscale/tailscale#22125
In an IPv6-only tailnet (via using disableIPv4), the ping view never works.
Client.pingonly used the peer's primary IPv4 address, and when there isn't one it fails immediately with "No IP address for peer" without ever reaching the LocalAPI. The user sees "An unknown error occurred. Please try again."Fall back to the peer's primary IPv6 address, as
PeerViewalready does for the peer's subtitle. IPv4 is still preferred when present. The LocalAPI ping handler parses the address withnetip.ParseAddr, so IPv6 needs no other changes.Testing
ClientTestcases that capture the LocalAPI path: dual-stack peers still ping IPv4; IPv6-only peers now ping IPv6. The IPv6 case fails without the fix (ping is never sent).make tailscale-debug(gradlew test assembleDebug) in the repo's build image: all 88 unit tests pass and the debug APK builds.🤖 Generated with Claude Code