netfilter: nft_set_bitmap: incorrect bitmap size
authorPablo Neira Ayuso <pablo@netfilter.org>
Sun, 26 Feb 2017 16:12:11 +0000 (17:12 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 26 Feb 2017 20:00:19 +0000 (21:00 +0100)
priv->bitmap_size stores the real bitmap size, instead of the full
struct nft_bitmap object.

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

index 97f9649bcc7e8b26969e29dab5b00ad28d5db6c3..152d226552c174929fd8973f023eaac888e4b0a9 100644 (file)
@@ -258,7 +258,7 @@ static int nft_bitmap_init(const struct nft_set *set,
 {
        struct nft_bitmap *priv = nft_set_priv(set);
 
-       priv->bitmap_size = nft_bitmap_total_size(set->klen);
+       priv->bitmap_size = nft_bitmap_size(set->klen);
 
        return 0;
 }