Re: [EXIM] Restricting connections from a single IP address

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Jim Knoble
Fecha:  
A: exim-users
Asunto: Re: [EXIM] Restricting connections from a single IP address
På 1998-Oct-05 klokka 12:37:52 +0100 skrivet Nigel Metheringham:

: I didn't think another db file was necessary or desirable. What you do
: end up doing is storing state in the master daemon for each child
: (including peer IP), and most likely at the point where you would fork (or
: just after) wipping through your list of open connections and counting
: occurrences of that peer IP. I think that other than for seriously large
: systems (ones bigger than even I run) this would be as good a way as any
: since you are only likely to be linearly searching a couple of hundred
: entries - however first cut would show the efficiency hit and a
: re-implementation could then be done if needed.

I'm a little late on this, having been gone for the weekend, but
mightn't it be slightly more efficient to keep a hash table of IP's
along with the count of connections to each IP? It might require
slightly more time to add an IP to the hash table than to a linear
list, but would significantly reduce the time spent searching for a
count of connections to a specific IP.

Just a thought.

--jim

%%%%%%%%%%%%%%% jim knoble %%%%%%%% jmknoble@??? %%%%%%%%%%%%%%%%%

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