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

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Jim Knoble
Data:  
Para: 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/ ***