Skip to contentSkip to conversation

netfilter: nf_table_offload: Fix check the offload flags in nft_indr_block_cb

PATCH New [email protected] 1 participant 1 message Sep 3, 2019

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

PATCH 1/1 netfilter: nf_table_offload: Fix check the offload flags in nft_indr_block_cb

From: wenxu <[email protected]>

In the nft_indr_block_cb handle offload chain should check the offload flags for the chain.

Fixes 9a32669fecfb ("netfilter: nf_tables_offload: support indr block call")
---
 net/netfilter/nf_tables_offload.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
net/netfilter/nf_tables_offload.c +2 -1
index ca9e0cb..3f49fe8 100644
@@ -363,7 +363,8 @@ static void nft_indr_block_cb(struct net_device *dev,
 			continue;
 
 		list_for_each_entry(chain, &table->chains, list) {
-			if (!nft_is_base_chain(chain))
+			if (!nft_is_base_chain(chain) ||
+			    !(chain->flags & NFT_CHAIN_HW_OFFLOAD))
 				continue;
 
 			basechain = nft_base_chain(chain);
Signature · 1 line
1.8.3.1