Release the list of new hooks that are pending to be registered in case that unsupported flowtable flags are provided.
Unified · Split
| @@ -7433,11 +7433,15 @@ static int nft_flowtable_update(struct nft_ctx *ctx, const struct nlmsghdr *nlh, · 7432 unmodified lines | |||
| 7433 | 7433 | ||
| 7434 | if (nla[NFTA_FLOWTABLE_FLAGS]) { | 7434 | if (nla[NFTA_FLOWTABLE_FLAGS]) { |
| 7435 | flags = ntohl(nla_get_be32(nla[NFTA_FLOWTABLE_FLAGS])); | 7435 | flags = ntohl(nla_get_be32(nla[NFTA_FLOWTABLE_FLAGS])); |
| 7436 | if (flags & ~NFT_FLOWTABLE_MASK) | 7436 | if (flags & ~NFT_FLOWTABLE_MASK) { |
| 7437 | return -EOPNOTSUPP; | 7437 | err = -EOPNOTSUPP; |
| 7438 | goto err_flowtable_update_hook; | ||
| 7439 | } | ||
| 7438 | if ((flowtable->data.flags & NFT_FLOWTABLE_HW_OFFLOAD) ^ | 7440 | if ((flowtable->data.flags & NFT_FLOWTABLE_HW_OFFLOAD) ^ |
| 7439 | (flags & NFT_FLOWTABLE_HW_OFFLOAD)) | 7441 | (flags & NFT_FLOWTABLE_HW_OFFLOAD)) { |
| 7440 | return -EOPNOTSUPP; | 7442 | err = -EOPNOTSUPP; |
| 7443 | goto err_flowtable_update_hook; | ||
| 7444 | } | ||
| 7441 | } else { | 7445 | } else { |
| 7442 | flags = flowtable->data.flags; | 7446 | flags = flowtable->data.flags; |
| 7443 | } | 7447 | } |