https://bugs.openldap.org/show_bug.cgi?id=9287
Ryan Tandy ryan@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.openldap.org/s | |how_bug.cgi?id=8376
--- Comment #7 from Ryan Tandy ryan@openldap.org --- (In reply to Quanah Gibson-Mount from comment #6)
The only function that uses gethostbyname_r is the private internal function ldap_pvt_gethostbyname_a in libldap/util-int.c
That function is only called in one location, in libldap/os-ip.c function ldap_connect_to_host, and that is if and only if getaddrinfo was not found.
The stack trace that was posted shows where it is used:
1418 #6 0x00007f5e9244ce6f in gethostbyname_r@@GLIBC_2.2.5 () from /lib64/libc.so.6 1419 #7 0x00007f5e90e2667e in ldap_pvt_gethostbyname_a (name=name@entry=0x7fff152052c0 "mix-udmee-1-67784ddf44-5krt4", resbuf=resbuf@entry=0x7ff f152052a0, buf=buf@entry=0x7fff15205290, result=result@entry=0x7fff15205298, herrno_ptr=herrno_ptr@entry=0x7fff1520528c) at util-int.c:453 1420 #8 0x00007f5e90e268cd in ldap_pvt_get_fqdn (name=0x7fff152052c0 "mix-udmee-1-67784ddf44-5krt4", name@entry=0x0) at util-int.c:851
That is valid and true in RE24 (and I think still in master too), getaddrinfo is not used in getting our own FQDN, even if it's available.
This issue might actually be a better test case for answering my concern from 8376 since nss_ldap is not involved this time.
Where exactly is the 10 sec delay coming from, though? Even if gethostbyname doesn't support ipv6, I'd expect things to fail quickly rather than delay...