Commit 7e6136f1 authored by Pablo Neira Ayuso's avatar Pablo Neira Ayuso
Browse files

netfilter: nftables: report EOPNOTSUPP on unsupported flowtable flags



Error was not set accordingly.

Fixes: 8bb69f3b ("netfilter: nf_tables: add flowtable offload control plane")
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 8b2030b4
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -6963,9 +6963,11 @@ 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);
	flowtable->data.type = type;