In CI, the Test-Connection IPv4 with explicit PingOptions test specifies -DontFragment, however the response object has $result.Reply.Options.DontFragment set to $false after execution.
Another issue is that providing the gateway address instead of the hostname on Windows and Linux CI platforms leads to an ArgumentNullException which does not seem to reproduce locally.
@rjmholt I thought we had a known issue for the first one, not sure where it is at the moment, but... yeah I knew about that one. IIRC you'll see it in the test file somewhere as part of the tests for that parameter too. It's the .NET API ignoring the requested setting (presumably because it's not actually supported on Unix yet).
aka welcome to the wacky world of .NET's rather lacking support/compat/functionality for its base networking APIs 馃槙
First issue is tracked in https://github.com/dotnet/runtime/issues/927
I've mainly opened this issue to track things I hit when fixing up the CI tests, since getting CI back to passing was my responsibility last week.
@vexx32 and @iSazonov it's clear you've done a lot of work in this area, so thank you so much for that. It also sounds like this might be an opportunity for us to speak to the .NET team -- it might be worth discussing with @SteveL-MSFT what .NET APIs we are experiencing issues with and make a list of any we might want prioritised
Probably best to look through the code to be sure, but from memory, we mainly use Ping, Dns, and TcpClient classes in Test-Connection currently... and iirc they all have their own problems. DNS was the most stable thing until it started failing recently, actually. 馃槀
Wishlist (from memory, I'm sure I'll forget some):
Ttl) actually works on Non-Windows OS's (intermediate hops come back with no usable data, all reporting TimedOut and the maximum response time for every single node in the network until it reaches the target machine). Windows reports TtlExpired with a proper response time given.DontFragment option set a) actually respects the option properly, and b) actually works / reports proper errors on non-Windows OS. If you look at the current code we essentially have to catch all exceptions instead of just the appropriate one which we can easily determine on Windows; on Unix IIRC we get either native or nonspecific exceptions thrown.DontFragment option should be reflected in the returned ping reply object's PingOptions data, currently it is not.-Traceroute -TcpPort $x support in the cmdlet, this would be a hard requirement for it.)
Most helpful comment
I've mainly opened this issue to track things I hit when fixing up the CI tests, since getting CI back to passing was my responsibility last week.
@vexx32 and @iSazonov it's clear you've done a lot of work in this area, so thank you so much for that. It also sounds like this might be an opportunity for us to speak to the .NET team -- it might be worth discussing with @SteveL-MSFT what .NET APIs we are experiencing issues with and make a list of any we might want prioritised