]> git.itanic.dy.fi Git - linux-stable/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)
commite920dde5160887d07b738f5a7f593b1fa9b1e32e
tree947962b3ad71db1c28300ac83660820fe64c94c8
parent170a1fb9c01bc40b7e8fd57a32ac9a0e131ec5b6
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: 665153ff5752 ("netfilter: nf_tables: add bitmap set type")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nft_set_bitmap.c