]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
netfilter: nft_dynset: report EOPNOTSUPP on missing set feature
authorPablo Neira Ayuso <pablo@netfilter.org>
Sun, 27 Dec 2020 11:33:44 +0000 (12:33 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Jan 2021 19:16:24 +0000 (20:16 +0100)
commita798b367a066ae1e929d0c5dbef8d28a132afa7c
treef58ecddce8cd70c11daad04dab7cfeee0f393911
parent5e401ea71676bd7c82ce44eb663fec7678ccffdd
netfilter: nft_dynset: report EOPNOTSUPP on missing set feature

commit 95cd4bca7b1f4a25810f3ddfc5e767fb46931789 upstream.

If userspace requests a feature which is not available the original set
definition, then bail out with EOPNOTSUPP. If userspace sends
unsupported dynset flags (new feature not supported by this kernel),
then report EOPNOTSUPP to userspace. EINVAL should be only used to
report malformed netlink messages from userspace.

Fixes: 22fe54d5fefc ("netfilter: nf_tables: add support for dynamic set updates")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/netfilter/nft_dynset.c