Skip to contentSkip to conversation

netlink: fix chain attribute parsing

PATCH Applied Arturo Borrero Gonzalez 2 participants 2 messages Feb 26, 2014 – Feb 27, 2014 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netlink: fix chain attribute parsing

The handle's table was being set to the chain name instead of the chain table attribute.

---
 src/netlink.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/netlink.c +1 -1
index 2871888..b036dce 100644
@@ -514,7 +514,7 @@ static int list_chain_cb(struct nft_chain *nlc, void *arg)
 	chain->handle.family =
 		nft_chain_attr_get_u32(nlc, NFT_CHAIN_ATTR_FAMILY);
 	chain->handle.table  =
-		xstrdup(nft_chain_attr_get_str(nlc, NFT_CHAIN_ATTR_NAME));
+		xstrdup(nft_chain_attr_get_str(nlc, NFT_CHAIN_ATTR_TABLE));
 	chain->handle.handle =
 		nft_chain_attr_get_u64(nlc, NFT_CHAIN_ATTR_HANDLE);
 
maintainer Applied
#1 lore raw
Quoted 2 lines · Arturo Borrero Gonzalez

The handle's table was being set to the chain name instead of the chain table attribute.

Applied, thanks Arturo.