diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2022-06-06 18:31:29 +0300 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2022-06-06 20:19:15 +0300 |
commit | 3a41c64d9c1185a2f3a184015e2a9b78bfc99c71 (patch) | |
tree | d7359ab63c6ffb3ae05ea7552f688bf642fbd5d2 /include/net/netfilter/nf_tables_offload.h | |
parent | 9dd732e0bdf538b1b76dc7c157e2b5e560ff30d3 (diff) | |
download | linux-3a41c64d9c1185a2f3a184015e2a9b78bfc99c71.tar.xz |
netfilter: nf_tables: bail out early if hardware offload is not supported
If user requests for NFT_CHAIN_HW_OFFLOAD, then check if either device
provides the .ndo_setup_tc interface or there is an indirect flow block
that has been registered. Otherwise, bail out early from the preparation
phase. Moreover, validate that family == NFPROTO_NETDEV and hook is
NF_NETDEV_INGRESS.
Fixes: c9626a2cbdb2 ("netfilter: nf_tables: add hardware offload support")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/net/netfilter/nf_tables_offload.h')
-rw-r--r-- | include/net/netfilter/nf_tables_offload.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/netfilter/nf_tables_offload.h b/include/net/netfilter/nf_tables_offload.h index 797147843958..3568b6a2f5f0 100644 --- a/include/net/netfilter/nf_tables_offload.h +++ b/include/net/netfilter/nf_tables_offload.h @@ -92,7 +92,7 @@ int nft_flow_rule_offload_commit(struct net *net); NFT_OFFLOAD_MATCH(__key, __base, __field, __len, __reg) \ memset(&(__reg)->mask, 0xff, (__reg)->len); -int nft_chain_offload_priority(struct nft_base_chain *basechain); +bool nft_chain_offload_support(const struct nft_base_chain *basechain); int nft_offload_init(void); void nft_offload_exit(void); |