]> git.hungrycats.org Git - linux/commit
netfilter: nf_tables: hit ENOENT on unexisting chain/flowtable update with missing...
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 25 Apr 2023 14:50:32 +0000 (16:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 May 2023 11:58:56 +0000 (13:58 +0200)
commit97b94e4a1d3927bfd428e473668f8e674a368d08
treefb2081b73ac9f78b7fb5c5136a615a6d080d0916
parentd8ed4a3f8b1b92a759a49fcde91bcfb347f0d025
netfilter: nf_tables: hit ENOENT on unexisting chain/flowtable update with missing attributes

[ Upstream commit 8509f62b0b07ae8d6dec5aa9613ab1b250ff632f ]

If user does not specify hook number and priority, then assume this is
a chain/flowtable update. Therefore, report ENOENT which provides a
better hint than EINVAL. Set on extended netlink error report to refer
to the chain name.

Fixes: 5b6743fb2c2a ("netfilter: nf_tables: skip flowtable hooknum and priority on device updates")
Fixes: 5efe72698a97 ("netfilter: nf_tables: support for adding new devices to an existing netdev chain")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/nf_tables_api.c