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
- gh-154291: Fix socket.has_dualstack_ipv6() on DragonFly BSD #154292
- [3.15] gh-154291: Fix socket.has_dualstack_ipv6() on DragonFly BSD (GH-154292) #154299
- [3.14] gh-154291: Fix socket.has_dualstack_ipv6() on DragonFly BSD (GH-154292) #154300
- [3.13] gh-154291: Fix socket.has_dualstack_ipv6() on DragonFly BSD (GH-154292) #154301