[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: AI_ADDRCONFIG in libldap/os-ip.c on solaris9



Thanks for digging up the info here; I had forgotten about running into this problem back then. Since Stig Venaas apparently never replied about why he made that particular change, and all the available documentation indicates that this flag is not legal for getaddrinfo(), I've reverted that change in CVS.

Mike O'Rourke wrote:

Hi all,

I am compiling OpenLDAP 2.2.15 on Solaris 9. When I run 'make test',
the first test fails with 'ldap_bind: Can't contact LDAP server (-1)'.

I did some digging and found that it is the ai_flags member of the
hints structure in libldap that is the problem. There was a similar
thread on 11 August, Tony B. had a similar (exactly the same?) problem
on AIX 5.1 (Bind Fails on AIX 5.1 due to getaddrinfo parm). Howard
chalked the problem up to a "rather broken getaddrinfo()" on AIX 5.1.


AIX 5.1 has other issues with getaddrinfo(), unrelated to this hints/flags problem. In particular, it requires any service to be known in /etc/services before it will succeed, even if you specify a numeric port number instead of a service name. This restriction makes it tedious to use test servers on arbitrary port numbers, among other things. By any measure, the AIX behavior is pure brain-damage...

However, in December, 2003 Howard asked on the development list what the
purpose of using AI_ADDRCONFIG was as on netbsd 6.1, it is a flag that
is valid for the getipnodebyname structure (RE: commit:
ldap/libraries/libldap os-ip.c). Well, guess what ... on Solaris 9, that
is also the case -- it is a valid flag for getipnodebyname and _not_ for
hints. AI_ADDRCONFIG does not seem to be used on Linux (at least on the
distros I use).

So, do we have three widely used OSes (OK, so maybe AIX isn't exactly
"widely used"!) that have a "broken getaddrinfo()", or is this something
that needs fixing in OpenLDAP? An answer to Howard's question in
December, by the way, is not to be found in the list archives. So, I
would like to know, what was AI_ADDRCONFIG put in for if it is going to
mandate not using a perfectly good OS version of getaddrinfo() and, on
_what_ OS is this actually useful? Is getaddrinfo() broken, or is
op-ip.c broken?

I did, of course try setting 'ac_cv_func_getaddrinfo=no' as Howard
suggested to Tony, and it works as long as I do not try to enable IPv6
(sometinig I am experimenting with on my local net.)

Thanks, Mike.


--
 -- Howard Chu
 Chief Architect, Symas Corp.       Director, Highland Sun
 http://www.symas.com               http://highlandsun.com/hyc
 Symas: Premier OpenSource Development and Support