[PATCH] ct: endless loop when initializing netfilter/ct cache

Thomas Graf tgraf at suug.ch
Mon Nov 10 13:49:51 PST 2014


On 11/10/14 at 09:59pm, Holger Eitzenberger wrote:
> cache: avoid duplicate check on initial dump
> 
> From: Holger Eitzenberger <holger at eitzenberger.org>
> 
> The cache pickup does a check for duplicates for some time now.
> 
> However, the pickup in nl_cache_refill() explicitely clears the
> cache, so the pickup doesn't need to actually do the dupe check,
> as uniqueness is already guaranteed be Netlink subsystem.
> 
> And avoiding the dup check is beneficitial for performance
> reasons, as the current algorithm is O(n^2).
> 
> Signed-off-by: Holger Eitzenberger <holger at eitzenberger.org>

LGTM, thanks Holger!

Acked-by: Thomas Graf <tgraf at suug.ch>



More information about the libnl mailing list