Skip to content

IPV4 address sent to Quinn requires casting or else resolves incorrectly with IPV6 enabled on Windows #1375

@danrossi

Description

@danrossi

I found an issue when publishing on the Windows side that is not evident on the WSL side. When IPV6 is enabled on the interface it's messing up the socket address where IPV6 becomes merged into it. Any IPV4 on Windows needs to be casted to IPV4 it seems to work correctly. Publishing is falling back to websocket for now on Windows with IPV6 enabled. It was happening for localhost and a static host map over SSL.

 sendmsg error: Os { code: 10049, kind: AddrNotAvailable, message: "The requested address is not valid in its context." }, Transmit: { destination: [::ffff:192.168.x.x]:8443, src_ip: None, ecn: Some(Ect0), len: 2400, segment_size: Some(1200) }

The ip sent to the socket here needs casting if it's an IPV4 address. So it's resolves the hostname to a static IP I set with hostname mapping. Then needs to be casted to IPV4 using this. Quinn references this casting but only for localhost and no example how to parse out the ipaddress into arguments like that.

IpAddr::V4(Ipv4Addr::new(192, 168, 1, 10));

https://github.com/moq-dev/moq/blob/main/rs/moq-native/src/quinn.rs#L111

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions