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

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



At 09:23 PM 9/24/00 +0000, venaas@alfa.itea.ntnu.no wrote:
>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.

I have no problem with this approach.

>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.

I concur.

>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.

I suggest we check for getaddrinfo() and use it found (for ipv4 or ipv6),
but require INET6_ADDRSTRLEN before enabling ipv6.

>If you could put in the necessary stuff, I'll do some tests afterwards.

No problem...

>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