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

ICMP Destination Unreachable identified as Timeout #27373

Closed
Petermarcu opened this issue Sep 11, 2018 · 2 comments
Closed

ICMP Destination Unreachable identified as Timeout #27373

Petermarcu opened this issue Sep 11, 2018 · 2 comments
Milestone

Comments

@Petermarcu
Copy link
Member

@gserfont commented on Fri Aug 10 2018

Issue Title

ICMP Destination Unreachable identified as Timeout

General

Using .Net Core 2.1.301 on OSX 10.13.6

SendPingAsync seems to incorrectly report the reason for Ping failure.

            var reply = await ping.SendPingAsync(Theip, timeout);
            if (reply.Status == System.Net.NetworkInformation.IPStatus.Success)
            {
                Console.WriteLine("Success:" + Theip);
            }
            if (reply.Status == System.Net.NetworkInformation.IPStatus.DestinationHostUnreachable)
            {
                Console.WriteLine("Destination host unreachable:" + Theip);
            }
            if (reply.Status == System.Net.NetworkInformation.IPStatus.DestinationUnreachable)
            {
                Console.WriteLine("Destination unreachable:" + Theip);
            }
            if (reply.Status == System.Net.NetworkInformation.IPStatus.TimedOut) //Everything hits here .. 
            {
                Console.WriteLine("Destination timedout:" + Theip);
            }

screen shot 2018-08-10 at 15 31 41

screen shot 2018-08-10 at 15 20 34

screen shot 2018-08-10 at 15 27 59

@wfurt
Copy link
Member

wfurt commented Sep 19, 2018

I could not reproduce it @gserfont

I wraped your code to simple console app and it works as expected for me.
macik2:poll furt$ dotnet run 10.10.80.10
Destination timedout:10.10.80.10

I would recommend to do packet capture for ICMP traffic.

Also note, that on Unix (including OSX/MacOS) the implementation changes depending on user privilege. If possible .net uses RAW sockets and falls back to executing system 'ping' utility if needed.

Please provide more info.

@karelz
Copy link
Member

karelz commented Nov 2, 2018

Not actionable, closing. If you have more information available in future, we can reopen. Thanks!

@karelz karelz closed this as completed Nov 2, 2018
@msftgits msftgits transferred this issue from dotnet/corefx Jan 31, 2020
@msftgits msftgits added this to the 3.0 milestone Jan 31, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants