Skip to content

android: update DNS when default network is changed - #857

Open
kari-ts wants to merge 1 commit into
mainfrom
kari/validatebug
Open

android: update DNS when default network is changed#857
kari-ts wants to merge 1 commit into
mainfrom
kari/validatebug

Conversation

@kari-ts

@kari-ts kari-ts commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

When a new network is detected, we get onAvailable, onCapabilitiesChanged, onLinkPropertiesChanged, and these trigger recomputing and possible updating of the default network. Only onLinkPropertiesChanged updates the dns config, and if the network validation happens after onLinkPropertiesChanged fires, then the cached default network is still on a different network. This refreshes the dns config when a capabilities change causes the selected network to change.

Updates tailscale/corp#47631

When a new network is detected, we get onAvailable, onCapabilitiesChanged, onLinkPropertiesChanged, and these trigger recomputing and possible updating of the default network. Only onLinkPropertiesChanged updates the dns config, and if the network validation happens after onLinkPropertiesChanged fires, then the cached default network is still on a different network.
This refreshes the dns config when a capabilities change causes the selected network to change.

Updates tailscale/corp#47631

Signed-off-by: kari-ts <kari@tailscale.com>
@kari-ts
kari-ts requested review from barnstar and cmol September 4, 2026 16:39

@cmol cmol left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good on the surface, though I don't think I am super authoritative on android ATM.

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