netfilter: nf_tables: release new hooks on unsupported flowtable flags
Release the list of new hooks that are pending to be registered in case
that unsupported flowtable flags are provided.
Fixes: 78d9f48f7f
("netfilter: nf_tables: add devices to existing flowtable")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
2c9e455977
commit
c271cc9feb
1 changed files with 8 additions and 4 deletions
|
@ -7433,11 +7433,15 @@ static int nft_flowtable_update(struct nft_ctx *ctx, const struct nlmsghdr *nlh,
|
||||||
|
|
||||||
if (nla[NFTA_FLOWTABLE_FLAGS]) {
|
if (nla[NFTA_FLOWTABLE_FLAGS]) {
|
||||||
flags = ntohl(nla_get_be32(nla[NFTA_FLOWTABLE_FLAGS]));
|
flags = ntohl(nla_get_be32(nla[NFTA_FLOWTABLE_FLAGS]));
|
||||||
if (flags & ~NFT_FLOWTABLE_MASK)
|
if (flags & ~NFT_FLOWTABLE_MASK) {
|
||||||
return -EOPNOTSUPP;
|
err = -EOPNOTSUPP;
|
||||||
|
goto err_flowtable_update_hook;
|
||||||
|
}
|
||||||
if ((flowtable->data.flags & NFT_FLOWTABLE_HW_OFFLOAD) ^
|
if ((flowtable->data.flags & NFT_FLOWTABLE_HW_OFFLOAD) ^
|
||||||
(flags & NFT_FLOWTABLE_HW_OFFLOAD))
|
(flags & NFT_FLOWTABLE_HW_OFFLOAD)) {
|
||||||
return -EOPNOTSUPP;
|
err = -EOPNOTSUPP;
|
||||||
|
goto err_flowtable_update_hook;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
flags = flowtable->data.flags;
|
flags = flowtable->data.flags;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue