netfilter: nf_tables: NFTA_SET_ELEM_KEY_END requires concat and interval flags
authorPablo Neira Ayuso <pablo@netfilter.org>
Fri, 12 Aug 2022 14:21:28 +0000 (16:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Aug 2022 09:40:22 +0000 (11:40 +0200)
commit0df32f45be40d0cf0e29a9e194d2f9af60242057
tree80539f6350c519c47fff35abc00a4f552cc080d2
parent46f64e6325ee8c52f9e4f8b4d001f51d7bb8446b
netfilter: nf_tables: NFTA_SET_ELEM_KEY_END requires concat and interval flags

commit 88cccd908d51397f9754f89a937cd13fa59dee37 upstream.

If the NFT_SET_CONCAT|NFT_SET_INTERVAL flags are set on, then the
netlink attribute NFTA_SET_ELEM_KEY_END must be specified. Otherwise,
NFTA_SET_ELEM_KEY_END should not be present.

For catch-all element, NFTA_SET_ELEM_KEY_END should not be present.
The NFT_SET_ELEM_INTERVAL_END is never used with this set flags
combination.

Fixes: 7b225d0b5c6d ("netfilter: nf_tables: add NFTA_SET_ELEM_KEY_END attribute")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/netfilter/nf_tables_api.c