Date: Thu, 21 Feb 2019 02:57:23 +0000 From: <Weike.Chen@Dell.com> To: <emulation@FreeBSD.org> Subject: Potential issues for linux socket syscall Message-ID: <b2d310eaeb304bf1bdcaa49efe8c4f86@KULX13MDC127.APAC.DELL.COM>
next in thread | raw e-mail | index | archive | help
Hi Linux emulation experts, I find a potential issue on FreeBSD 12 official release for Linux emulation syscall. The function 'linux_getsockname' in 'linux_socket.c' calls 'bsd_to_linux_sockaddr', and it calls 'bsd_to_linux_domain' to convert 'sa_family' from BSD domain to Linux domain. But after calling 'bsd_to_linux_sockaddr', 'linux_sa_put' is called, and it calls 'bsd_to_linux_domain' to convert 'sa_family' from BSD domain to Linux domain again. But the 'sa_family' has already been converted. Since the value of AF_INTE6 and LINUX_AF_INET6 is different, and converting twice will cause issue. Regards, Alvin Chen Dell | Cloud Client Computing office +86-10-82862506, fax +86-10-82861554, Dell Lync 8672506 weike_chen@dell.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b2d310eaeb304bf1bdcaa49efe8c4f86>
