On DragonFly BSD, socket.has_dualstack_ipv6() returns True, but dualstack sockets do not actually work: setsockopt(IPPROTO_IPV6, IPV6_V6ONLY, 0) succeeds silently without clearing the flag, so the socket stays IPv6-only and an IPv4 client connection is refused.
has_dualstack_ipv6() only checks that setsockopt does not raise, so it does not detect this. It should verify with getsockopt that IPV6_V6ONLY was actually cleared.
This makes test_socket.test_dual_stack_client_v4 fail on DragonFly with ConnectionRefusedError.
Linked PRs
On DragonFly BSD,
socket.has_dualstack_ipv6()returns True, but dualstack sockets do not actually work:setsockopt(IPPROTO_IPV6, IPV6_V6ONLY, 0)succeeds silently without clearing the flag, so the socket stays IPv6-only and an IPv4 client connection is refused.has_dualstack_ipv6()only checks thatsetsockoptdoes not raise, so it does not detect this. It should verify withgetsockoptthatIPV6_V6ONLYwas actually cleared.This makes
test_socket.test_dual_stack_client_v4fail on DragonFly withConnectionRefusedError.Linked PRs