>In mozilla's case, it's not the FreeBSD resolver that's trying ipv6 and
>then ipv4. Mozilla does it explicitly by calling gethostbyname2 first
>with AF_INET6, and if that fails with AF_INET. You could just patch it
>to not make the first gethostbyname2 call. From a quick browse of the
>source from  mozilla.org it's src/misc/prnetdb.c around line # 579 or
>thereabouts.

Yeah. That's exactly what I did to make it work nicely on my machine, but
that's not a real solution as it breaks IPv6 resolving. 

I'm going to try Terry's solution and try and do concurrent lookups. Mozilla
is already using pthreads, so I should be able to just spawn the two
requests in separate threads and take the one that comes back first. I may
even spawn the IPv6 one a little earlier to give it a slightly better chance
of coming back first.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to