diff mbox

[libnftables] chain: json: fix family and table error

Message ID 20130718113601.7544.7115.stgit@Ph0enix
State Accepted
Headers show

Commit Message

Alvaro Neira July 18, 2013, 11:36 a.m. UTC
From: Álvaro Neira Ayuso <alvaroneay@gmail.com>

In (74ccff7 chain: json: use string to identify policy), the json support for chain was unintentionally
swapping the table name and the family.


Signed-off-by: Alvaro Neira Ayuso <alvaroneay@gmail.com>
---
 0 files changed


--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Pablo Neira Ayuso July 19, 2013, 10:21 a.m. UTC | #1
On Thu, Jul 18, 2013 at 01:36:01PM +0200, Alvaro Neira wrote:
> From: Álvaro Neira Ayuso <alvaroneay@gmail.com>
> 
> In (74ccff7 chain: json: use string to identify policy), the json
> support for chain was unintentionally swapping the table name and
> the family.

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/src/chain.c b/src/chain.c
index 0a0e688..3c73511 100644
--- a/src/chain.c
+++ b/src/chain.c
@@ -746,8 +746,8 @@  static int nft_chain_snprintf_json(char *buf, size_t size, struct nft_chain *c)
 				"\"table\": \"%s\","
 				"\"use\": %d",
 			c->name, c->handle, c->bytes, c->packets,
-			NFT_CHAIN_JSON_VERSION, c->table,
-			nft_family2str(c->family), c->use);
+			NFT_CHAIN_JSON_VERSION, nft_family2str(c->family),
+			c->table, c->use);
 		SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
 
 	if (c->flags & (1 << NFT_CHAIN_ATTR_HOOKNUM)) {