On Sat, 21 Dec 2002, Jeroen Massar wrote: > Benoit Panizzon [mailto:[EMAIL PROTECTED] wrote: > > > Found the solution myself after hours of 'googling'. > > > > The Kernel 2.4 has a bug|feature: A ipv6 connection is > > automaticly a ipv4 > > connection. So if sendmail tryes to open a port twice it's locked. > > If you enable only inet6 inet4 is automaticly enabled. > > > > Solution for the mc file: > > > > DAEMON_OPTIONS(`Port=smtp, Name=MTA, Family=inet6') > > > > (and no line about inet) > > Notez bien, if an application first requests an AF_INET (ipv4) socket > and binds to it, then requests an AF_INET6 (ipv6) socket and binds to > that on the same port, this should work. >
Unfortunatly that's not true on all linux kernels. When the application binds to ipv6 it also bind to ipv4. In this case if you bind ipv4 first, ipv6 will fail because it cannot bind on ipv4. >From my experience the only way to do it correctly (and afaik according to RFC) is to bind ipv6 first. Then you will have to handle ipv4 in such a way that if ipv6 succeeded, it will try to bind anyway and errors should not be fatal. In this way you will basically cover all possibility (BSD, linux, linux+usagi). Regards Fabio

