[Pdns-dev] [dns-operations] dns response rate limiting (DNS RRL) patch available for testing

Peter van Dijk peter.van.dijk at netherlabs.nl
Fri Jun 22 18:28:03 CEST 2012


Hello,

On Jun 22, 2012, at 15:32 , abang wrote:
> ips can be deleted at the end of prequery if it gets too large. I think that would have no major negative effect.
> 
> ...
> maxips = 10000
> 
> function prequery ( dnspacket )
>   ...
>   ...
>   if #ips > maxips
>   then
>      ips = {}
>   end
> end

Because ips is being used as a dictionary (Perl would call it a hash), #ips is always zero, and there is no cheap way to ask a table how many entries it has.. Keeping a running total separately is feasible, of course.

Kind regards,
-- 
Peter van Dijk
Netherlabs Computer Consulting BV - http://www.netherlabs.nl/



More information about the Pdns-dev mailing list