On Mon, Dec 08, 2008 at 07:02:16PM -0500, Joey Hess wrote: > The hang turned out to by caused by this line: > > hp = gethostbyaddr((char *)&cli_addr, clien, AF_INET); > > My vague understanding of this issue with nss-mdns and reverse lookups is > based on a message from Lennart Poettering to #348578: > > > If the order of "mdns" and "dns" is swapped in nsswitch.conf, reverse > > host name lookups will always be tried first with multicast DNS -- > > which will fail in most cases, and thus adds a 3s delay to most calls > > to gethostbyaddr(), which is unacceptable. > > I've lost track of whether we're following Lennart's recommendation for > ordering, but reverse lookups still behave as he describes. > > At first I considered just removing this reverse lookup, as the hostname > is barely used. But then I remembered that gethostbyaddr is deprecated > anyway. Thus the attached patch, which converts it to use the shinier > getnameinfo. Happily, getnameinfo does not hang, so this fixes the > problem for me. >
Thanks! What's is with the manpage patch? I've got it already, but personally I think the man page places the "SEE ALSO" correctly without it. I didn't see any errors from man when I used it on the unpatched man page. regards Andrew
signature.asc
Description: Digital signature