-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
QUIC: IPv6 constant looks suspicious in native helper #53495
Comments
Tagging subscribers to this area: @dotnet/ncl Issue DetailsI noticed this while reviewing #53461. namespace System.Net.Quic.Implementations.MsQuic.Internal
{
internal static class MsQuicAddressHelpers
{
internal const ushort IPv4 = 2;
internal const ushort IPv6 = 23;
..
internal static SOCKADDR_INET IPEndPointToINet(IPEndPoint endpoint)
{
socketAddress.Ipv6._family = IPv6; AF_INET6 is 10 on Linux and 30 on macOS. It feels like this should come from PAL.
|
Loopback/localhost shouldn't be used. It is very unclear what the system will resolve it to. Either you specify the address family, or you use literal addresses for localhost. |
In MsQuic, we ensure all IPv6 family values seen through the API are 23, to match windows, and our does have users use |
I noticed this while reviewing #53461.
AF_INET6 is 10 on Linux and 30 on macOS. It feels like this should come from PAL.
It also seems like our tests use CreateQuicListener() that use IPEndPoint(IPAddress.Loopback, 0) so we may have test gaps for IPv6.
The text was updated successfully, but these errors were encountered: