netfilter: nft_hash: add missing NFTA_HASH_OFFSET's nla_policy
authorLiping Zhang <liping.zhang@spreadtrum.com>
Wed, 12 Oct 2016 13:10:45 +0000 (21:10 +0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 17 Oct 2016 15:43:53 +0000 (17:43 +0200)
Missing the nla_policy description will also miss the validation check
in kernel.

Fixes: 70ca767ea1b2 ("netfilter: nft_hash: Add hash offset value")
Signed-off-by: Liping Zhang <liping.zhang@spreadtrum.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nft_hash.c

index 09473b4..baf694d 100644 (file)
@@ -44,6 +44,7 @@ static const struct nla_policy nft_hash_policy[NFTA_HASH_MAX + 1] = {
        [NFTA_HASH_LEN]         = { .type = NLA_U32 },
        [NFTA_HASH_MODULUS]     = { .type = NLA_U32 },
        [NFTA_HASH_SEED]        = { .type = NLA_U32 },
+       [NFTA_HASH_OFFSET]      = { .type = NLA_U32 },
 };
 
 static int nft_hash_init(const struct nft_ctx *ctx,