summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorÁlvaro Neira Ayuso <alvaroneay@gmail.com>2013-07-18 13:36:01 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2013-07-18 14:16:51 +0200
commit3a9c8f838c6b5edc94e61d4c3f5169ee253a1db4 (patch)
tree2fccd632fd8b70697c9cb6fcc2924ff527a79e1b
parentd5cb5967adab0dd4d52b62bc62b8b59dbb5a6056 (diff)
chain: json: fix wrong display of table and family
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> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--src/chain.c4
1 files changed, 2 insertions, 2 deletions
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)) {