]> git.baikalelectronics.ru Git - kernel.git/commitdiff
netfilter: nft_payload: add missing attribute validation for payload csum flags
authorJakub Kicinski <kuba@kernel.org>
Tue, 3 Mar 2020 05:08:32 +0000 (21:08 -0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 4 Mar 2020 01:28:17 +0000 (02:28 +0100)
Add missing attribute validation for NFTA_PAYLOAD_CSUM_FLAGS
to the netlink policy.

Fixes: 027bee253306 ("netfilter: nft_payload: layer 4 checksum adjustment for pseudoheader fields")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nft_payload.c

index 1993af3a2979527362bfa419a73c65f71a789363..a7de3a58f553d57885876ba730b5ab2877422101 100644 (file)
@@ -129,6 +129,7 @@ static const struct nla_policy nft_payload_policy[NFTA_PAYLOAD_MAX + 1] = {
        [NFTA_PAYLOAD_LEN]              = { .type = NLA_U32 },
        [NFTA_PAYLOAD_CSUM_TYPE]        = { .type = NLA_U32 },
        [NFTA_PAYLOAD_CSUM_OFFSET]      = { .type = NLA_U32 },
+       [NFTA_PAYLOAD_CSUM_FLAGS]       = { .type = NLA_U32 },
 };
 
 static int nft_payload_init(const struct nft_ctx *ctx,