Skip to content

Commit

Permalink
netfilter: nf_tables_offload: fix check the chain offload flag
Browse files Browse the repository at this point in the history
In the nft_indr_block_cb the chain should check the flag with
NFT_CHAIN_HW_OFFLOAD.

Fixes: 9a32669 ("netfilter: nf_tables_offload: support indr block call")
Signed-off-by: wenxu <wenxu@ucloud.cn>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  • Loading branch information
wenxu authored and ummakynes committed Jan 24, 2020
1 parent ab658b9 commit c83de17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/netfilter/nf_tables_offload.c
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ static void nft_indr_block_cb(struct net_device *dev,

mutex_lock(&net->nft.commit_mutex);
chain = __nft_offload_get_chain(dev);
if (chain) {
if (chain && chain->flags & NFT_CHAIN_HW_OFFLOAD) {
struct nft_base_chain *basechain;

basechain = nft_base_chain(chain);
Expand Down

0 comments on commit c83de17

Please sign in to comment.