]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nft_set_bitmap: keep a list of dummy elements
authorPablo Neira Ayuso <pablo@netfilter.org>
Fri, 10 Mar 2017 17:32:31 +0000 (18:32 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 13 Mar 2017 12:34:21 +0000 (13:34 +0100)
commit05c6ff87f6b7157a42b9cda5dd5013a7c6cdd978
tree947962b3ad71db1c28300ac83660820fe64c94c8
parent97ae33a78d595420cf50293a596f0429ccf645fc
netfilter: nft_set_bitmap: keep a list of dummy elements

Element comments may come without any prior set flag, so we have to keep
a list of dummy struct nft_set_ext to keep this information around. This
is only useful for set dumps to userspace. From the packet path, this
set type relies on the bitmap representation. This patch simplifies the
logic since we don't need to allocate the dummy nft_set_ext structure
anymore on the fly at the cost of increasing memory consumption because
of the list of dummy struct nft_set_ext.

Fixes: 18d2a5721b0a ("netfilter: nf_tables: add bitmap set type")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nft_set_bitmap.c