Skip to content

Android system tun#847

Merged
LeeSmet merged 2 commits into
mainfrom
android_system_tun
Jun 5, 2026
Merged

Android system tun#847
LeeSmet merged 2 commits into
mainfrom
android_system_tun

Conversation

@LeeSmet
Copy link
Copy Markdown
Contributor

@LeeSmet LeeSmet commented Jun 5, 2026

No description provided.

LeeSmet added 2 commits June 5, 2026 10:22
The FFI's create_tun_fd only ran TUNSETIFF, but the downstream
tun/android.rs assumes the fd is fully configured (matching the
mobile/VpnService contract). Result: the interface had no IP, was
administratively down, and could not carry traffic.

Extend create_tun_fd to assign the node's IPv6 with the global subnet's
prefix length (installs the on-link 400::/7 route), set MTU 1400 to match
tun/android.rs's LINK_MTU, and bring the interface up via SIOCSIFFLAGS.
Previously android always used the same code which was an issue for
system services.

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
@LeeSmet LeeSmet merged commit 5fd4cf8 into main Jun 5, 2026
17 checks passed
@LeeSmet LeeSmet deleted the android_system_tun branch June 5, 2026 11:06
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