mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 09:31:14 +00:00
netfilter: nftables: report EOPNOTSUPP on unsupported flowtable flags
Error was not set accordingly.
Fixes: 8bb69f3b29
("netfilter: nf_tables: add flowtable offload control plane")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
8b2030b430
commit
7e6136f1b7
1 changed files with 3 additions and 1 deletions
|
@ -6963,8 +6963,10 @@ static int nf_tables_newflowtable(struct net *net, struct sock *nlsk,
|
||||||
if (nla[NFTA_FLOWTABLE_FLAGS]) {
|
if (nla[NFTA_FLOWTABLE_FLAGS]) {
|
||||||
flowtable->data.flags =
|
flowtable->data.flags =
|
||||||
ntohl(nla_get_be32(nla[NFTA_FLOWTABLE_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;
|
goto err3;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
write_pnet(&flowtable->data.net, net);
|
write_pnet(&flowtable->data.net, net);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue