Skip to content

SendPingAsync: Exception when using as root under macOS #33430

@pgrosslicht

Description

@pgrosslicht

Hello,

when using SendPingAsync as root on a macOS system, a SocketException is thrown (System.Net.Sockets.SocketException (56): Socket is already connected). If run as a regular user, it works. It also works for root if you use .NET 2.2. This leads me to believe that this behaviour was introduced in this commit c6efaf4. I also tested this on different macOS machines and the outcome was the same, but on a Ubuntu machine it works with sudo as well.

Here is the program I used to reproduce this issue: https://gist.github.com/pgrosslicht/0acf36322247793925dd62692b9202cd.
Here are screenshots running said program with .NET 3.1 with and without sudo and with .NET 2.2 with and without sudo.

NET3 1

NET2 2

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions