• Yi-Hung Wei's avatar
    netfilter: nf_conncount: Switch to plain list · cb2b36f5
    Yi-Hung Wei authored
    Original patch is from Florian Westphal.
    
    This patch switches from hlist to plain list to store the list of
    connections with the same filtering key in nf_conncount. With the
    plain list, we can insert new connections at the tail, so over time
    the beginning of list holds long-running connections and those are
    expired, while the newly creates ones are at the end.
    
    Later on, we could probably move checked ones to the end of the list,
    so the next run has higher chance to reclaim stale entries in the front.
    Signed-off-by: default avatarYi-Hung Wei <yihung.wei@gmail.com>
    Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
    Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
    cb2b36f5
nft_connlimit.c 7.42 KB