Skip to content

android: cache default network and set callback for binding fn#754

Open
kari-ts wants to merge 1 commit intomainfrom
kari/bindsock
Open

android: cache default network and set callback for binding fn#754
kari-ts wants to merge 1 commit intomainfrom
kari/bindsock

Conversation

@kari-ts
Copy link
Collaborator

@kari-ts kari-ts commented Mar 6, 2026

After switching from cellular to wifi without ipv6, ForeachInterface still sees rmnet prefixes, so HaveV6 stays true, and magicsock keeps attempting ipv6 connections that either route through cellular or time out for users on wifi without ipv6

This
-Caches cachedDefaultNetwork on nevwork event in NetworkChangeCallback
-Implements BindSocketToNetwork, a callback that binds the socket to the currently selected Network
-Sets the callback function whtne the VPN starts and clears it on disconnect

Updates tailscale/tailscale#6152

After switching from cellular to wifi without ipv6, ForeachInterface still sees rmnet prefixes, so HaveV6 stays true, and magicsock keeps attempting ipv6 connections that either route through cellular or time out for users on wifi without ipv6

This
-Caches cachedDefaultNetwork on nevwork event in NetworkChangeCallbac
-Implements BindSocketToNetwork, a callback that binds the socket to the currently selected Network
-Sets the callback function whtne the VPN starts and clears it on disconnect

Updates tailscale/tailscale#6152

Signed-off-by: kari-ts <kari@tailscale.com>
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.

1 participant