]> asedeno.scripts.mit.edu Git - linux.git/commit
netfilter: conntrack: don't attempt to iterate over empty table
authorFlorian Westphal <fw@strlen.de>
Thu, 28 Apr 2016 17:13:42 +0000 (19:13 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 5 May 2016 14:39:44 +0000 (16:39 +0200)
commit88b68bc5237c84c6ff6f78568653780869a94a95
tree3501a26e75aefc8551c823ec70ae646a16aadccd
parent5e3c61f981756361e7dc74e2c673121028449e35
netfilter: conntrack: don't attempt to iterate over empty table

Once we place all conntracks into same table iteration becomes more
costly because the table contains conntracks that we are not interested
in (belonging to other netns).

So don't bother scanning if the current namespace has no entries.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_conntrack_core.c