Ping does not work on iOS devices #36941
Labels
area-System.Net
enhancement
Product code improvement that does NOT require public API changes/additions
help wanted
[up-for-grabs] Good issue for external contributors
os-ios
Apple iOS
Milestone
Description
This is fragment of #36890. When Ping is executed on non-windows platforms as ordinary user, it will try to start system ping utility as separate process. That will not work on various mobile devices.
Configuration
I was able to reproduce this on iPhone X simulator with 13.4 iOS. This is generally applicable to all .NET versions.
Regression?
no.
Other information
@mandel-macaque kindly pointed at Apple's example https://developer.apple.com/library/archive/samplecode/SimplePing/Introduction/Intro.html
as well as Mono has working implementation.
It turns out, OSX can use socket(AF_INET, SOCK_DGRAM, IPPROTO_ICMP) and socket(AF_INET6, SOCK_DGRAM, IPPROTO_ICMPV6) without privilege in way similar to RAW sockets. That would allow us to have full featured ping without all the troubles we had in the past with ping6 on OSX and it would avoid spawning new process. As well as this would be portable to mobile devices.
Sure enough, ping utility on OSX is not SUID as it is on Linux.
vs Linux
The text was updated successfully, but these errors were encountered: