dotnet/runtime

[Ping] Unix - some problems in ping API

Open

#927 建立於 2018年4月9日

在 GitHub 查看
 (30 留言) (8 反應) (0 負責人)C# (5,445 fork)batch import
area-System.Netbughelp wantedtenet-compatibility

倉庫指標

Star
 (17,886 star)
PR 合併指標
 (平均合併 12天 11小時) (30 天內合併 661 個 PR)

描述

Related https://github.com/dotnet/corefx/issues/9350

In PowerShell repo we port TestConnection cmdlet and catch some problems in the ping API.

The problems documented in the cmdlet tests - see comments and if (!isWindows) blocks.

Below short list:

  1. Dontfragment doesn't work on Unixes This definitely should work on Linux and on MacOs too
  2. PingReply.Buffer is empty on Unix. Expected - a buffer we send.
  3. Ping unreachable host returns ErrorCode 6 (Handle is invalid) on Unix. Expected (as on Windows) - 11001 (Host not found).
  4. API always returns Options based on default PingOptions() constructor (Ttl=128, DontFragment = false). PingReply.Options.DontFragment:
  • on Windows always returns false. Expected - real value from ping request.
  • on Unix always returns null. Expected - real value from ping request (or false if not implemented).

PingReply.Options.Ttl - always 128. Expected - real value from ping request. PingReply.Options.Status - always Success (if we expect 'TtlExpired'). Expected - real status.

  1. PingReply doesn't return ScopeId in IPAddress

貢獻者指南