Contract weekly report #60 | Haiku Project

Hello world!

Not much commits from me this week, as I’m still working on the libbind update, and I’m also doing some work for other customers. I got netresolv to build after implementing the missing getifaddrs function in Haiku - this is a non-POSIX function, but it is available in Linux and all major BSDs. It enumerates all network addresses for all network interfaces on the system, similar to our BNetworkRoster and BNetworkInterface classes. netresolv (the libbind replacement) uses this to properly implement address resolution in an RFC-compliant way. I got the thing to compile and resolve DNS requests, and all basic network tools are working properly again (FTP, telnet, etc). I have checked that the issue we were getting with connecting to GMail servers is fixed: when there is no IPv6 address configured, the DNS resolver now properly returns IPv4 addresses for the servers to connect to. However, I’m still working on some issues with apps using the “services kit” (HaikuDepot and WebPositive). These seem to hit some kind of deadlock waiting on replies from the DNS server or just be very slow (even worse than before). Things could be improved here to reduce interlocking between the different threads doing requests. The netresolv implementation of getaddrinfo and other resolution functions is based on a pthread lock, which means calling them from several threads is safe, but slow. There is a getaddrinfo_r function which is reentrant and avoids this problem.

This is a companion discussion topic for the original entry at