getaddrinfo()-related replication problem on FreeBSD

Andrew Bartlett abartlet at
Mon Jun 4 18:07:38 MDT 2012

On Tue, 2012-06-05 at 02:12 +0300, Andriy Syrovenko wrote:
> Andrew,
> > 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
> acceptable?

It seems a very deliberate policy decision then.  I guess we may just
have to blacklist FreeBSD on this point then. 

The problem is that by not testing it (I can't see how we can, without
doing DNS lookups in configure, which would suck) we will never know how
far the rot spreads (what about the other BSDs?).

Andrew Bartlett

Andrew Bartlett                      
Authentication Developer, Samba Team 

More information about the samba-technical mailing list