mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
netfilter: nf_tables: disallow NFT_SET_ELEM_CATCHALL and NFT_SET_ELEM_INTERVAL_END
commitfc0ae524b5upstream. These flags are mutually exclusive, report EINVAL in this case. Fixes:aaa31047a6("netfilter: nftables: add catch-all set element support") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
0df32f45be
commit
7ac21b920e
@@ -5101,6 +5101,9 @@ static int nft_setelem_parse_flags(const struct nft_set *set,
|
||||
if (!(set->flags & NFT_SET_INTERVAL) &&
|
||||
*flags & NFT_SET_ELEM_INTERVAL_END)
|
||||
return -EINVAL;
|
||||
if ((*flags & (NFT_SET_ELEM_INTERVAL_END | NFT_SET_ELEM_CATCHALL)) ==
|
||||
(NFT_SET_ELEM_INTERVAL_END | NFT_SET_ELEM_CATCHALL))
|
||||
return -EINVAL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user