SocketFd::accept() always returns SocketFd object with m_ipv6_socket flag set to false.
As the result SocketFd::set_priority() which called later on the same socket executes
Coverage decreased (-0.02%) to 17.873% when pulling 0f957c2576d0d0c4c227e4453d92f67884e608af on vladmovchan:IPv6_patch into 3a6a61a4138048134f9048aef81a52f9bf821b29 on rakshasa:master.
SocketFd::accept()
always returnsSocketFd
object withm_ipv6_socket
flag set to false. As the resultSocketFd::set_priority()
which called later on the same socket executeseven for IPv6 sockets.
Linux tolerates this, but on FreeBSD such call on IPv6 socket cause error, and as the result following call chain fails:
what causes immediate drop of any incoming connection right after it has been accept()-ed.
Syscall trace of this case on FreeBSD host:
For comparison same trace on CentOS 7 host:
This change fixes https://github.com/rakshasa/rtorrent/issues/786