netfilter: nf_tables: do not allow NFT_SET_ELEM_INTERVAL_END flag and data
This combination is not allowed since end interval elements cannot contain data. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Acked-by: Patrick McHardy <kaber@trash.net>
This commit is contained in:
parent
0165d9325d
commit
bd7fc645da
|
@ -2741,6 +2741,9 @@ static int nft_add_set_elem(const struct nft_ctx *ctx, struct nft_set *set,
|
|||
if (nla[NFTA_SET_ELEM_DATA] == NULL &&
|
||||
!(elem.flags & NFT_SET_ELEM_INTERVAL_END))
|
||||
return -EINVAL;
|
||||
if (nla[NFTA_SET_ELEM_DATA] != NULL &&
|
||||
elem.flags & NFT_SET_ELEM_INTERVAL_END)
|
||||
return -EINVAL;
|
||||
} else {
|
||||
if (nla[NFTA_SET_ELEM_DATA] != NULL)
|
||||
return -EINVAL;
|
||||
|
|
Loading…
Reference in New Issue