getaddrinfo()-related replication problem on FreeBSD

Andriy Syrovenko andriys at
Mon Jun 4 17:12:37 MDT 2012


> A patch to the wscript to detect platforms with this breakage (I'm
> surprised it hasn't been noticed elsewhere before!) and then a patch to
> force the flag on seems most sensible at this point.

The getaddrinfo() function on FreeBSD fails this way (i.e. returns
EAI_FAIL) only when the following conditions are met:

* The host name in question contains underscore.
* The host name in question exists. If the name does not exists the
function returns EAI_NONAME.
* The host name in question is in the DNS. If it is placed in
/etc/hosts the function succeeds.

This makes basing detection of this kind of breakage on the analysis
of the function's behavior particularly difficult. I don't see any
other way to detect this kind of breakage except by checking for a
particular OS name (and possibly version as well). Is this approach


More information about the samba-technical mailing list