forked from Minki/linux
netfilter: nf_tables: reject NFT_SET_ELEM_INTERVAL_END flag for non-interval sets
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
16c45eda96
commit
55df35d22f
@ -3138,6 +3138,9 @@ static int nft_add_set_elem(struct nft_ctx *ctx, struct nft_set *set,
|
||||
elem.flags = ntohl(nla_get_be32(nla[NFTA_SET_ELEM_FLAGS]));
|
||||
if (elem.flags & ~NFT_SET_ELEM_INTERVAL_END)
|
||||
return -EINVAL;
|
||||
if (!(set->flags & NFT_SET_INTERVAL) &&
|
||||
elem.flags & NFT_SET_ELEM_INTERVAL_END)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (set->flags & NFT_SET_MAP) {
|
||||
|
Loading…
Reference in New Issue
Block a user