From: wenxu Date: Sun, 19 Jan 2020 05:18:30 +0000 (+0800) Subject: netfilter: nf_tables_offload: fix check the chain offload flag X-Git-Tag: v5.15~4702^2~1^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c83de17dd6308fb74696923e5245de0e3c427206;p=platform%2Fkernel%2Flinux-starfive.git netfilter: nf_tables_offload: fix check the chain offload flag In the nft_indr_block_cb the chain should check the flag with NFT_CHAIN_HW_OFFLOAD. Fixes: 9a32669fecfb ("netfilter: nf_tables_offload: support indr block call") Signed-off-by: wenxu Signed-off-by: Pablo Neira Ayuso --- diff --git a/net/netfilter/nf_tables_offload.c b/net/netfilter/nf_tables_offload.c index a9ea29afb09f..2bb28483af22 100644 --- a/net/netfilter/nf_tables_offload.c +++ b/net/netfilter/nf_tables_offload.c @@ -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);