Skip to content

QUIC: IPv6 constant looks suspicious in native helper #53495

@wfurt

Description

@wfurt

I 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.
It also seems like our tests use CreateQuicListener() that use IPEndPoint(IPAddress.Loopback, 0) so we may have test gaps for IPv6.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.Net.QuicenhancementProduct code improvement that does NOT require public API changes/additions

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions