netfilter: nf_tables: report EOPNOTSUPP on unsupported flags/object type
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 7 Apr 2020 12:10:11 +0000 (14:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Apr 2020 08:36:19 +0000 (10:36 +0200)
commitdaefa51c43533447c1c6a7dbafd48c0387fe19c6
tree87c6c31627c18220a8f5f2dd9ed4fafc4c85df2a
parentaea3873fb02cb5363a7dcb942d2e6e2bd005934b
netfilter: nf_tables: report EOPNOTSUPP on unsupported flags/object type

commit d9583cdf2f38d0f526d9a8c8564dd2e35e649bc7 upstream.

EINVAL should be used for malformed netlink messages. New userspace
utility and old kernels might easily result in EINVAL when exercising
new set features, which is misleading.

Fixes: 8aeff920dcc9 ("netfilter: nf_tables: add stateful object reference to set elements")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/netfilter/nf_tables_api.c