[EXIM] problem when binding two interfaces

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: James FitzGibbon
Dátum:  
Címzett: exim-users
Tárgy: [EXIM] problem when binding two interfaces

I think I've found a slight problem with exim when binding two local
interfaces.

My config file includes the line

local_interfaces = 204.92.48.15:198.133.36.15

When exim starts up, both addresses are bound to. If a HUP signal is sent
when there are no active child processes, everything re-binds correctly.

If, however, there is a child process active when I sent the HUP, exim
fails to bind to 198.133.36.15 (stating so in the log) until that child
process completes normally or is killed. The log entry I get looks like
this :

1998-05-06 08:14:23 socket bind() to port 25 for address 198.133.36.15
failed: Address already in use: waiting before trying again

At this time, exim is sitting in the middle of the loop
responsible for socket binding (line 685 of daemon.c). Until the child
dies (or the 10 retries have been exceeded, which takes 5 minutes), the
main socket which has been bound isn't responding either.

Net effect is that if you bind to two local interfaces, a HUP signal
leaves exim dead in the water for a variable amount of time to a maximum
of 5 minutes.

I don't know if this can be worked around; from looking at the code in
daemon.c and child.c, nothing jumps out at me.

The only thing that came to mind is that the bound sockets are stored in
the listen_socket array. When a child is forked, handle_smtp_call is
passed the single listen socket that the call came in on, which it dups.
It doesn't look like the child ever makes an attempt to close down the
other listen sockets that the parent had bound.

I thought that using SO_REUSEADDR was supposed to prevent stuff like this
from happening, but it doesn't seem to my case.

Any thoughts ?

--
j.

James FitzGibbon                                                james@???
Member, ACC Corps of Internet Engineers           Voice/Fax (416)207-7171/7123


"...much of today's software is comprised of mostly 'D' and very little 'R'"
                                                              -- Alan Cooper



--
*** Exim information can be found at http://www.exim.org/ ***