Re: [EXIM] problem when binding two interfaces

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Philip Hazel
Ημερομηνία:  
Προς: James FitzGibbon
Υ/ο: exim-users
Αντικείμενο: Re: [EXIM] problem when binding two interfaces
On Wed, 6 May 1998, James FitzGibbon wrote:

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


<snip>

> 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.


That sounds very plausible. I think you have diagnosed your own problem!

Thanks for the report. I'm not sure how easily I can test this out, not
having two local interfaces, but I will get to it in due course.

Meanwhile, you could try the experiment of closing down the other listen
sockets in children of the daemon. The comment at the head of
handle_smtp_call() reads

/* This function is called when an SMTP connection has been accepted.
If there are too many, give an error message and close down. Otherwise
spin off a sub-process to handle the call. The listening socket is
required so that it can be closed in the sub-process.

Clearly, when I added the code for handling multiple listening sockets,
I overlooked (= forgot about) this aspect of the listening socket. That
function will need modifying so that its argument is the list of
listening sockets plus a count, so that the sub-process can shut down
all of them.

Would you like me to send you some sample code to try out, or can you
hack this up by yourself? Please let me know if it solves the problem.

-- 
Philip Hazel                   University Computing Service,
ph10@???             New Museums Site, Cambridge CB2 3QG,
P.Hazel@???          England.  Phone: +44 1223 334714



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