dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.06k stars 4.69k forks source link

error code 11050 for IPStatus not listed #101999

Open rjrizzuto opened 5 months ago

rjrizzuto commented 5 months ago

Description

11050 (general failure) is returned from a Ping.Send when wifi is turned off. That code is not listed in the enums for the IPStatus class

Reproduction Steps

Call Ping.Send with wifi is disabled. Print the reply.status field.

Expected behavior

GeneralFailure is printed

Actual behavior

11050 is printed

Regression?

No response

Known Workarounds

No response

Configuration

.net 8 Windows 11 x64 Unsure if it is specific to this platform - can't test on Linux currently

Other information

No response

antonfirsov commented 3 months ago

It would be nice to have an enum member to map IP_GENERAL_FAILURE=11050 to, but I assume it would be platform specific. @wfurt are there other Windows-specific values in IPStatus?

rjrizzuto commented 3 months ago

It seems like a catch all error code to report "other". I imagine other platforms might need that as well.

liveans commented 3 months ago

Triage: Not critical for 9.0. Moving to future. We'll take it into 9.0 if the time permits.

piotreksda commented 2 months ago

Hi, I am new here. I have looked into this a bit and was wondering if just adding GeneralFailure = 11050 to the enum IPStatus is enough. I was also wondering if I should also change something in the MapV4TypeToIPStatus and MapV6TypeToIPStatus methods but here I would ask for help though.

liveans commented 2 months ago

Hi, I am new here. I have looked into this a bit and was wondering if just adding GeneralFailure = 11050 to the enum IPStatus is enough. I was also wondering if I should also change something in the MapV4TypeToIPStatus and MapV6TypeToIPStatus methods but here I would ask for help though.

Hello @piotreksda, this should be enough but while we were triaging this issue, we overlooked that IPStatus is public API, so this should go through API Proposal first, and only after then that we can implement this.