]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
netlink: fix chain attribute parsing
authorArturo Borrero <arturo.borrero.glez@gmail.com>
Wed, 26 Feb 2014 17:46:59 +0000 (18:46 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 27 Feb 2014 09:19:15 +0000 (10:19 +0100)
The handle's table was being set to the chain name instead of the
chain table attribute.

Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/netlink.c

index 2871888954b296c98fa51d26a651d0c1bc89c3a8..b036dcef7344e70d47c6af3c80acee88b2b3623e 100644 (file)
@@ -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);