Commit 53479909 authored by Pablo Neira Ayuso's avatar Pablo Neira Ayuso

netfilter: nf_tables: skip netlink portID validation if zero

nft_table_lookup() allows us to obtain the table object by the name and
the family. The netlink portID validation needs to be skipped for the
dump path, since the ownership only applies to commands to update the
given table. Skip validation if the specified netlink PortID is zero
when calling nft_table_lookup().

Fixes: 6001a930 ("netfilter: nftables: introduce table ownership")
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent ea45fdf8
......@@ -571,7 +571,7 @@ static struct nft_table *nft_table_lookup(const struct net *net,
table->family == family &&
nft_active_genmask(table, genmask)) {
if (nft_table_has_owner(table) &&
table->nlpid != nlpid)
nlpid && table->nlpid != nlpid)
return ERR_PTR(-EPERM);
return table;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment