In the linux socket recvfrom emulation the incoming socket address family is not converted to BSD values, although the reverse conversion is done. The values for local and inet are identical so this still works, but inet6 values differ. Fix: Apply patch. This also defaults unknown families to inet as apparently linux ignores bad values in this syscall. This was necessary to get a linux binary to work. Alternatively maybe just force the address family to AF_UNSPEC. Patch attached with submission follows:
Responsible Changed From-To: freebsd-bugs->freebsd-emulation Over to maintainer(s).
grab it
A commit references this bug: Author: dchagin Date: Sun May 22 19:08:29 UTC 2016 New revision: 300431 URL: https://svnweb.freebsd.org/changeset/base/300431 Log: Convert proto family in both directions. The linux and native values for local and inet are identical, but for inet6 values differ. PR: 155040 Reported by: Simon Walton MFC after: 2 week Changes: head/sys/compat/linux/linux_socket.c
A commit references this bug: Author: dchagin Date: Sun Jun 5 07:43:20 UTC 2016 New revision: 301431 URL: https://svnweb.freebsd.org/changeset/base/301431 Log: MFC r300431: Convert proto family in both directions. The linux and native values for local and inet are identical, but for inet6 values differ. PR: 155040 Reported by: Simon Walton Changes: _U stable/10/ stable/10/sys/compat/linux/linux_socket.c