Skip to content

Ping does not work on iOS devices #36941

Closed

Description

@wfurt

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.

Shining:src furt$ ls -al /sbin/ping
-r-xr-xr-x  1 root  wheel  55216 Jan 23 05:59 /sbin/ping

vs Linux

root@vps2001:~# ls -al /bin/ping
-rwsr-xr-x 1 root root 61240 Nov 10  2016 /bin/ping

Activity

  1. added
    os-macos
    help wanted
    os-ios
    on May 24, 2020
  2. added
    untriaged
    on May 24, 2020
  3. added this to the 6.0.0 milestone on Jun 24, 2020
  4. removed
    os-macos
    untriaged
    on Jun 24, 2020
  5. added
    enhancement
    on Apr 23, 2021
  6. ghost added
    in-pr
    on May 4, 2021
  7. added a commit that references this issue on May 7, 2021
    e98614e
  8. ghost removed
    in-pr
    on May 7, 2021
  9. ghost locked as resolved and limited conversation to collaborators on Jun 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.Netenhancementhelp wantedos-ios

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions