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
[email protected]

_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-emulation
To unsubscribe, send any mail to "[email protected]"

Reply via email to