netfilter: conncount: Support count only use case
authorYi-Hung Wei <yihung.wei@gmail.com>
Sun, 4 Mar 2018 23:29:52 +0000 (15:29 -0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 20 Mar 2018 12:27:18 +0000 (13:27 +0100)
commit35d8deb80c30fdb2dee3e2dac71eab00d8a6fed5
treed9922affc365bbb0770c0c46bba7c9263b904e95
parent6aec208786c2a54cbf6135a0242b224e845bef98
netfilter: conncount: Support count only use case

Currently, nf_conncount_count() counts the number of connections that
matches key and inserts a conntrack 'tuple' with the same key into the
accounting data structure.  This patch supports another use case that only
counts the number of connections where 'tuple' is not provided.  Therefore,
proper changes are made on nf_conncount_count() to support the case where
'tuple' is NULL.  This could be useful for querying statistics or
debugging purpose.

Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com>
Acked-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_conncount.c