mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
netfilter: nftables: report EOPNOTSUPP on unsupported flowtable flags
[ Upstream commit7e6136f1b7] Error was not set accordingly. Fixes:8bb69f3b29("netfilter: nf_tables: add flowtable offload control plane") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a96a8cb050
commit
4a741b4df0
@@ -6753,8 +6753,10 @@ static int nf_tables_newflowtable(struct net *net, struct sock *nlsk,
|
||||
if (nla[NFTA_FLOWTABLE_FLAGS]) {
|
||||
flowtable->data.flags =
|
||||
ntohl(nla_get_be32(nla[NFTA_FLOWTABLE_FLAGS]));
|
||||
if (flowtable->data.flags & ~NFT_FLOWTABLE_MASK)
|
||||
if (flowtable->data.flags & ~NFT_FLOWTABLE_MASK) {
|
||||
err = -EOPNOTSUPP;
|
||||
goto err3;
|
||||
}
|
||||
}
|
||||
|
||||
write_pnet(&flowtable->data.net, net);
|
||||
|
||||
Reference in New Issue
Block a user