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

Re: build problem - INET6_ADDRSTRLEN / INET_ADDRSTRLEN undeclared (ITS#770)



On Sun, Sep 24, 2000 at 08:51:56PM +0000, Kurt@OpenLDAP.org wrote:
> >I think we need to check for INET6_ADDRSTRLEN and possibly other stuff
> >in addition to getaddrinfo(), In configure we should replace the current
> >getaddrinfo() check with something that checks both if getaddrinfo()
> >exists and if INET6_ADDRSTRLEN is defined. If the check succeeds we set
> >say LDAP_RFC2553_SUPPORT. This check might need to be expanded later.
> >In the source we then need to replace all HAVE_GETADDRINFO with
> >LDAP_RFC2553_SUPPORT. I think everyone with INET6_ADDRSTRLEN also got
> >getaddrinfo(), but this is safer.
> >
> >Does this sound okay Kurt (or anyone else)? Should I submit a patch or
> >can you put something together based on this?
> 
> Can we get away with just conditionally defining these macros
> (in <ac/socket.h>)?  or do we need to detect differing getaddrinfo
> semantics and adjust based upon that detection?

That's what I hoped at first, but it looks like at least Per, is missing
some IPv6 stuff as well. We could try to have detailed checks for
sockaddr_in6 and other needed stuff, but if we check for INET6_ADDRSTRLEN
we can be pretty sure we have the other things.

I think the situation is like this:

We have a set of users with getaddrinfo. A subset of those have
sockaddr_in6 and some other IPv6 stuff, and a subset of those again,
have INET6_ADDRSTRLEN. Instead of making detailed checks for the middle
set, it's easier to check for INET6_ADDRSTRLEN. Over time, most people
will have all these things hopefully.

Using just that check, there will be some people that could have used
IPv6 but won't, but I don't think that's such a big problem. Also some
people could have used the getaddrinfo code but won't, but there's no
reason for using getaddrinfo if they don't use IPv6.

When changing this in configure, we also need to change the first of
these lines:

if test $ac_cv_func_getaddrinfo = no ; then
        if test $ol_enable_ipv6 = yes ; then
                AC_MSG_ERROR([IPv6 support requires getaddrinfo()])
        fi
        ol_enable_ipv6=no
fi

If you could put in the necessary stuff, I'll do some tests afterwards.
If you want me to do it, it might take a few days, but it will be some
time before 2.0.5 is out I hope (:

BTW I have an idea on how to get rid of some of the ifdefs in
    daemon.c, will probably submit a patch in a few weeks (a bit
    busy at the moment). Also planning on fixing the perl backend.
    There's too little time....

Stig