]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_tables: use u32 for chain use counter
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 10 Jun 2014 08:53:01 +0000 (10:53 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 16 Jun 2014 11:07:44 +0000 (13:07 +0200)
commitc4469b4b5e155c36e678c1833c0e4b5b152c3ee9
tree5a7dc2ef6db3db90ae1a6807ebbaa6b9bdb627aa
parentacd860976fc38da4b7ca959a70bd92f1a92fd910
netfilter: nf_tables: use u32 for chain use counter

Since 6d09124 ("netfilter: nf_tables: allow to delete several objects
from a batch"), every new rule bumps the chain use counter. However,
this is limited to 16 bits, which means that it will overrun after
2^16 rules.

Use a u32 chain counter and check for overflows (just like we do for
table objects).

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/net/netfilter/nf_tables.h
net/netfilter/nf_tables_api.c