Fallback to the internal resolver on EAI_FAIL.
commitdb13facf3397d6043ae4324b78daf5346fed20ef
authorLandon Fuller <landonf@bikemonkey.org>
Sun, 17 Feb 2013 03:57:40 +0000 (16 22:57 -0500)
committerKarolin Seeger <kseeger@samba.org>
Mon, 18 Feb 2013 08:51:22 +0000 (18 09:51 +0100)
tree06451faa5d78ffb6c4977d8030cff042f8d87d29
parent62840319080908e234ba78affdbad25f53214441
Fallback to the internal resolver on EAI_FAIL.

On Linux, non-RFC 1034-complaint names (such as gc._msdsc.example.org)
will result in the resolver returning the non-POSIX EAI_NODATA. In that
case, the case statement here would fall back on the internal resolver,
allowing resolution to complete successfully.

On FreeBSD, the libc resolver uses the same validation code, but
the POSIX result of EAI_FAIL is returned instead of EAI_NODATA. Since
there was no case for this error code, no fallback to the internal
resolver would occur. This led to replication failing on FreeBSD.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sun Feb 17 07:06:36 CET 2013 on sn-devel-104
(cherry picked from commit 6dfb35f3ff7ad2d2089c0a3e5eab342384e45e4c)

Fix bug #9656 - [patch] Work around FreeBSD's getaddrinfo() underscore issue.
source4/libcli/resolve/dns_ex.c