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

Re: PF_LOCAL in getaddrinfo (ldapi:///)

I had planned to respond to your ITS report.

On Mon, Jul 23, 2001 at 11:49:17AM -0600, Oscar Bonilla wrote:
> I was trying to compile OpenLDAP 2.0.11 with support for ldapi:///
> which uses the PF_LOCAL family. However, I've discovered that
> the PF_LOCAL entry in getaddrinfo is ifdef'd out in FreeBSD.
> This is the relevant code for /usr/src/lib/libc/net/getaddrinfo.c
> #if 0
> 	{ PF_LOCAL, 0, ANY, ANY, NULL, 0x01 },
> #endif
> This causes a getaddrinfo call made by openldap with hints.ai_family
> set to AF_LOCAL to fail with an "ai_family not supported" error
> message.
> I tried it in Solaris and get the same error (I don't have Solaris's
> source code so I coulnd't check if it was not defined).
> Is this an error in the way OpenLDAP uses getaddrinfo or is there
> a reason for the OS's not supporting AF_LOCAL in calls to getaddrinfo?
> How can I fix this? Should I just unifdef PF_LOCAL in my OS's getaddrinfo
> or comment out the getaddrinfo in daemon.c?

I thought it was normal to support PF_LOCAL in getaddrinfo. It works on
Linux and I think I've seen it some other places. I'll try to check the
specs and maybe also check with some developers why the don't support
it. If the specs say it may not be implemented or developers have a
good reason for not implementing it, I'll add a workaround. Of course
we might have to add a workaround anyway, but I would like to do some
research first.

For now the easiest for you is to comment out #define HAVE_GETADDRINFO 1
in include/portable.h. But if you like some adventure you could see
what happens if you turn on PF_LOCAL in getaddrinfo.c.