[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Openldap 2.0.1 release on FreeBSD 4.1 (server socket bind problem)
On Wed, Sep 06, 2000 at 12:39:00PM +0200, Fabrice Akhen wrote:
> Hi
>
> I'm trying to use the new openldap release (never test the 2.x tree
> before).
>
> here is my config script
>
> ./configure --prefix=/opt/server/openldap2/openldap-2.0.1 --enable-sql
> --enable-ipv6=no --disable-ipv6
>
> All is ok on compilation.
>
> But when I start slapd I got :
> daemon: unsupported address family (28)
> slapd starting
>
> Watching this with lsof gives :
>
>
> slapd 89422 root 8u IPv6 0xc92e20c0 0t0 TCP *:ldap
>
> It seems to bind IPV6 family address.
>
> Is it a bug or a missconfiguration on my part ?
It's a bug.
I never really thought of the case where someone had an IPv6 enabled
host and didn't want to use IPv6. Your host has IPv6 by default.
If you don't have any connectivity you can leave IPv6 on and every-
thing should work well, I don't see any reason to turn it off.
If you have IPv6 connectivity and you don't want the server to be
reachable by IPv6 (don't see why), then it makes more sense, but you
could still have access lists to stop IPv6 access if you need to.
So, as a fix you can either turn IPv6 on, or you can try the following
patch to servers/slapd/daemon.c:
--- daemon.c.orig Wed Sep 6 13:25:37 2000
+++ daemon.c Wed Sep 6 13:25:46 2000
@@ -277,6 +277,8 @@
ldap_free_urldesc( lud );
sai = res;
do {
+ if (sai->ai_family == AF_INET6)
+ continue;
l.sl_sd = socket( sai->ai_family, sai->ai_socktype, sai->ai_protocol);
if ( l.sl_sd == AC_SOCKET_INVALID ) {
int err = sock_errno();
I'll fix this in a better way for CVS, but I think it should work
well for you.
Stig
--
Stig Venås Tel: +47 73 55 79 45
NTNU Fax: +47 73 55 79 01
ITEA/Nett, Prof. Brochs g. 6
N-7491 Trondheim, Norway E-mail: venaas@itea.ntnu.no