]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: ipset: Count non-static extension memory for userspace
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Thu, 10 Nov 2016 11:05:34 +0000 (12:05 +0100)
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Thu, 10 Nov 2016 12:28:45 +0000 (13:28 +0100)
commit77ff2eadc8e97fc357a339f6197666486df285a3
treeac8cbb3c53a770b1b05dab0b84ca83602d440416
parentc487c33e9f6261761df29ae8574d28f549e905be
netfilter: ipset: Count non-static extension memory for userspace

Non-static (i.e. comment) extension was not counted into the memory
size. A new internal counter is introduced for this. In the case of
the hash types the sizes of the arrays are counted there as well so
that we can avoid to scan the whole set when just the header data
is requested.

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
include/linux/netfilter/ipset/ip_set.h
include/linux/netfilter/ipset/ip_set_comment.h
net/netfilter/ipset/ip_set_bitmap_gen.h
net/netfilter/ipset/ip_set_core.c
net/netfilter/ipset/ip_set_hash_gen.h
net/netfilter/ipset/ip_set_list_set.c