[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Exim and IPv6 Help
>While I am the maintainer of the OpenBSD port of exim, I have no
>experience of IPv6 outside book reading. If this turns out to be an exim
>/ OpenBSD compatibility issue it should really go to ports@, while if
>this is an OpenBSD IPv6 vs any other OS IPv6 issues then we are probably
>in the right place.
actually, there are other operating systems implemented this way
(= AF_INET6 socket does not grab IPv4 traffic). that includes
at least NetBSD, Win2000 IPv6 beta, KAME/bsdi3, KAME/freebsd2.
i'd suggest exim to listen to both AF_INET and AF_INET6 addresses
by default.
>Given Phil (I see you are cc'ed) comments about further release of the
>3.xx branch, if there is an agreed on solution to this that can be added
>as a patch to the existing port (which is *still* not up to 3.31 - mea
>culpa) then drop me a line and I will check (to my ability - see IPv6
>comment above) and commit.
I guess I found the problem with the patch:
>> - if (bind(listen_sockets[sk], (struct sockaddr *)&sin,
>sizeof(sin)) < 0)
>> + if (bind(listen_sockets[sk], (struct sockaddr *)&sin,
>> + #ifdef HAVE_IPV6
>> + ipv6_socket? sizeof(sin.v6) : sizeof(sin.v4)
>> + #else
>> + sizeof(sin)
>> + #endif
>> + ) < 0)
you need to decide the "sizeof" part (3rd arg) dynamically according to
the address family of the listen_sockets[sk]. "ipv6_socket" is, I
guess, a constant. If you use ipv6_socket to determine address family,
you will mistakenly use sizeof(struct sockaddr_in6) while you are
passing sockaddr_in to the 2nd argument.
itojun