On Fri, 2018-04-27 at 16:32 +0100, Daniel P. Berrangé wrote:
> + /* From FreeBSD's inet6(4):
> + *
> + * By default, FreeBSD does not route IPv4 traffic to AF_INET6
> + * sockets. The default behavior intentionally violates RFC2553
> + * for security reasons. Listen to two sockets if you want to
> + * accept both IPv4 and IPv6 traffic.
> + *
> + * So this test will never work on FreeBSD, and need to skip it. */
This code is not supposed to be relying on IPV6_V6ONLY. The testSocketTCPAccept
method is supposed to create multiple listener sockets. We passing NULL as the
listen address, which means we are supposed to get two sockets, one listening
on IPv4 and one on IPv6. So the comment is right about FreeBSD being different
but that situation should not apply to this test AFAIK.
So I'm wondering why it hasn't listened on both sockets...
Mh, you're right, the IPv6 thing was just a red herring: the test
case just seems to fail or succeed pretty much randomly.
I tried compiling out everything but the basic "Socket TCP/IPv4
Accept" part, and even that didn't manage to run successfully for
any extended lenght of time in a tight loop.
I'm afraid we're going to need someone with more network expertise
than I have to look into it.
--
Andrea Bolognani / Red Hat / Virtualization