Re: [Exim] Exim with IPv6

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Sheldon Hearn
Date:  
À: Philip Hazel
CC: Kevin Sindhu, Andre Grueneberg, Philip Blundell, exim-users
Sujet: Re: [Exim] Exim with IPv6

On Tue, 10 Jul 2001 10:47:24 +0200, Sheldon Hearn wrote:

> I'll find out what SIOCGIFCONF_GIVES_ADDR actually means and give it a
> whirl with FreeBSD. I'll bother you again when I have something
> concrete to report. :-)


Okay, here we go.

When Exim is built with HAVE_IPV6 and then run on a FreeBSD host that
does not have IPV6 support compiled into the kernel or configured, the
call to bind(2) in daemon.c blows up because the 3rd argument to bind
(addrlen) looks weird. :-)

If I replace the bind(2) call in daemon.c with the following:

      if (bind(listen_sockets[sk], (struct sockaddr *)&sin,
         ipv6_address ? sizeof(sin.v6) : sizeof(sin.v4)) < 0)


then Exim binds to port 25 correctly and all is well.

Not sure why Philip's trick with the union doesn't work, but I'm
guessing something lower down in the kernel does some kind of validation
of addrlen.

In any case, using the code above instead of what's in place right now
should solve the problem, no?

Ciao,
Sheldon.