a6b9848 Eliminated duplicated code for trimming the tail of the banlist.

Poul-Henning Kamp phk at phk.freebsd.dk
Mon Dec 3 10:24:33 CET 2012


--------
In message <CANTn4cp7AyTh-GG0wUP2MqdFNTD_uk0SzBcoVM6GaPHvMOi68A at mail.gmail.com>
, Martin Blix Grydeland writes:

>I was looking at this patch, and I believe there is a problem with regard
>to how you implemented this.
>
>I believe the loop in ban_lurker() around successful ban_lurker_work calls
>when the ban_lurker is enabled, has the potential of running for much
>longer than intended. So long as there is a new ban added at an interval
>shorter than 2*ban_lurker_sleep, this loop will continue running, and then
>no tail bans will ever be dropped.

I have added a tail-trimming operation for every 10 successfull iterations
of the ban-lurker.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.



More information about the varnish-dev mailing list