Skip to contentSkip to conversation

netfilter: nf_tables_offload: fix check the chain offload flag

PATCH Superseded [email protected] 1 participant 1 message Jan 19, 2020

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 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.

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