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

Bind Fails on AIX 5.1 due to getaddrinfo parm



Title: Bind Fails on AIX 5.1 due to getaddrinfo parm

I just downloaded, configured, and built openLdap 2.2.13
on an AIX 5.1 system.  The configuration directives were
as follows (which I used successfully on 2.1.30):
        CC=xlc_r        \
        CPPFLAGS="-I/usr/local/include \
                  -I/usr/local/ssl/include \
                  -I/usr/local/BerkeleyDB.4.2/include" \
            LDFLAGS="-L/usr/local/ssl/lib     \
                     -L/usr/local/lib \
                     -L/usr/local/BerkeleyDB.4.2/lib" \
            MKDEP=/dnload/ldap_dir/openldap-2.1.30/build/mkdep.aix \
        ./configure --with-cyrus-sasl  \
                    --enable-bdb       \
                    --with-kerberos    \
                    --disable-shared   \
                    --enable-static    \
                    --disable-ipv6

When running "make test", I failed with a bind error "test000-rootdse".

The ldapsearch.out file shows the following (when I add a "-d 247" argument):
        ldap_create
        ldap_url_parse_ext(ldap://localhost:9011)
        ldap_bind_s
        ldap_simple_bind_s
        ldap_sasl_bind_s
        ldap_sasl_bind
        ldap_send_initial_request
        ldap_new_connection
        ldap_int_open_connection
        ldap_connect_to_host: TCP localhost:9011
        ldap_connect_to_host: getaddrinfo failed: Invalid flags in hints
        ldap_perror
        ldap_bind: Can't contact LDAP server (-1)

The message "Invalid flags in hints" means the hints.ai_flags contains an invalid value.
hints is an argument to getaddrinfo().

The source file "./libraries/libldap/os-ip.c" sets hints.ai_flags to  "AI_ADDRCONFIG".

If I comment out that line, rebuild, and retest… then the test completes successfully.

-tony