Skip to contentSkip to conversation

netfilter: nf_tables_offload: fix check the chain offload flag

PATCH Applied [email protected] 2 participants 2 messages Jan 19, 2020 – Jan 24, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 netfilter: nf_tables_offload: fix check the chain offload flag

From: wenxu <[email protected]>

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")

---
v2: add missing fix tag

 net/netfilter/nf_tables_offload.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/netfilter/nf_tables_offload.c +1 -1
index a9ea29a..2bb2848 100644
@@ -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);
Signature · 1 line
1.8.3.1