Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xcode: allow ICMP ping relay on macOS + iOS/tvOS platforms #12048

Conversation

agottardo
Copy link
Contributor

@agottardo agottardo commented May 7, 2024

Fixes #10393
Fixes tailscale/corp#15412
Fixes tailscale/corp#19808

On Apple platforms, exit nodes and subnet routers have been unable to relay pings from Tailscale devices to non-Tailscale devices due to sandbox restrictions imposed on our network extensions by Apple. The sandbox prevented the code in netstack.go from spawning the ping process which we were using.

Replace that exec call with logic to send an ICMP echo request directly, which appears to work in userspace, and not trigger a sandbox violation in the syslog.

@agottardo agottardo added OS-macos OS-ios OS-tvOS Issues concerning Apple's tvOS labels May 7, 2024
@agottardo agottardo self-assigned this May 7, 2024
@agottardo agottardo linked an issue May 7, 2024 that may be closed by this pull request
@agottardo agottardo force-pushed the 10393-pinging-devices-using-subnet-routing-on-apple-tv-does-not-work branch 2 times, most recently from e7920c8 to 38d5e00 Compare May 7, 2024 23:13
wgengine/netstack/netstack.go Outdated Show resolved Hide resolved
wgengine/netstack/netstack.go Outdated Show resolved Hide resolved
@agottardo agottardo force-pushed the 10393-pinging-devices-using-subnet-routing-on-apple-tv-does-not-work branch 2 times, most recently from adff786 to c964cd4 Compare May 9, 2024 20:01
@agottardo agottardo marked this pull request as draft May 9, 2024 20:01
@agottardo agottardo force-pushed the 10393-pinging-devices-using-subnet-routing-on-apple-tv-does-not-work branch 4 times, most recently from 34492db to a1a14b5 Compare May 9, 2024 23:25
@agottardo agottardo marked this pull request as ready for review May 9, 2024 23:26
@agottardo agottardo force-pushed the 10393-pinging-devices-using-subnet-routing-on-apple-tv-does-not-work branch 9 times, most recently from 1e94e6d to 6c33aaf Compare May 16, 2024 17:47
wgengine/netstack/netstack_userping_apple.go Outdated Show resolved Hide resolved
Fixes #10393
Fixes tailscale/corp#15412
Fixes tailscale/corp#19808

On Apple platforms, exit nodes and subnet routers have been unable to relay pings from Tailscale devices to non-Tailscale devices due to sandbox restrictions imposed on our network extensions by Apple. The sandbox prevented the code in netstack.go from spawning the `ping` process which we were using.

Replace that exec call with logic to send an ICMP echo request directly, which appears to work in userspace, and not trigger a sandbox violation in the syslog.

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
@agottardo agottardo force-pushed the 10393-pinging-devices-using-subnet-routing-on-apple-tv-does-not-work branch from 6c33aaf to ef9a27f Compare May 16, 2024 18:43
@agottardo agottardo merged commit e5f67f9 into main May 16, 2024
48 checks passed
@agottardo agottardo deleted the 10393-pinging-devices-using-subnet-routing-on-apple-tv-does-not-work branch May 16, 2024 18:57
Mmx233 pushed a commit to MultiMx/tailscale that referenced this pull request May 20, 2024
Fixes tailscale#10393
Fixes tailscale/corp#15412
Fixes tailscale/corp#19808

On Apple platforms, exit nodes and subnet routers have been unable to relay pings from Tailscale devices to non-Tailscale devices due to sandbox restrictions imposed on our network extensions by Apple. The sandbox prevented the code in netstack.go from spawning the `ping` process which we were using.

Replace that exec call with logic to send an ICMP echo request directly, which appears to work in userspace, and not trigger a sandbox violation in the syslog.

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS-ios OS-macos OS-tvOS Issues concerning Apple's tvOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pinging devices using subnet routing on Apple TV does not work
2 participants