You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue
For a UdpClient instance with underlying Socket having DualMode enabled, the socket does not work with hostnames that return IPv4 addresses.
Steps to reproduce
Set up a local hostname with IPv4 address - foobar.local
Create a UdpClient with AddressFamily.InterNetworkV6
Set sender.Client.DualMode = true, to enable IPv4 over IPv6
Send a datagram to a hostname sender.BeginSendAsync(new byte[1], 1, "foobar.local", 9000)
An exception is thrown that no valid IPv6 addresses could be found for foobar.local
Why it happens?
After the DNS resolution for the hostname is done, the addresses are directly matched against the socket's family(InterAddressV6 in our case), completely ignoring DualMode operation.
I'll submit a PR shortly
The text was updated successfully, but these errors were encountered:
Issue
For a
UdpClient
instance with underlyingSocket
havingDualMode
enabled, the socket does not work with hostnames that return IPv4 addresses.Steps to reproduce
foobar.local
UdpClient
withAddressFamily.InterNetworkV6
sender.Client.DualMode = true
, to enable IPv4 over IPv6sender.BeginSendAsync(new byte[1], 1, "foobar.local", 9000)
foobar.local
Why it happens?
After the DNS resolution for the hostname is done, the addresses are directly matched against the socket's family(
InterAddressV6
in our case), completely ignoringDualMode
operation.I'll submit a PR shortly
The text was updated successfully, but these errors were encountered: