All of lore.kernel.org
 help / color / mirror / Atom feed
* [libnftables PATCH 01/13] src: expr: missing commas in json output support
@ 2013-08-09 11:11 Alvaro Neira
  2013-08-09 11:12 ` [libnftables PATCH 02/13] src: expr: missing curly braces " Alvaro Neira
                   ` (12 more replies)
  0 siblings, 13 replies; 17+ messages in thread
From: Alvaro Neira @ 2013-08-09 11:11 UTC (permalink / raw)
  To: netfilter-devel; +Cc: eric

From: Álvaro Neira Ayuso <alvaroneay@gmail.com>

Added missing commas in json output support

Signed-off-by: Alvaro Neira Ayuso <alvaroneay@gmail.com>
---
 src/expr/meta.c |    2 +-
 src/expr/nat.c  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/expr/meta.c b/src/expr/meta.c
index ac01732..8f163f6 100644
--- a/src/expr/meta.c
+++ b/src/expr/meta.c
@@ -208,7 +208,7 @@ nft_rule_expr_meta_snprintf(char *buf, size_t len, uint32_t type,
 				meta->dreg, meta_key2str(meta->key));
 	case NFT_RULE_O_JSON:
 		return snprintf(buf, len, "\"dreg\" : %u, "
-					  "\"key\" : %s",
+					  "\"key\" : \"%s\"",
 				meta->dreg, meta_key2str(meta->key));
 	default:
 		break;
diff --git a/src/expr/nat.c b/src/expr/nat.c
index 4b7ec27..654d4d7 100644
--- a/src/expr/nat.c
+++ b/src/expr/nat.c
@@ -262,7 +262,7 @@ nft_rule_expr_nat_snprintf_json(char *buf, size_t size,
 	if (nat->type == NFT_NAT_SNAT)
 		ret = snprintf(buf, len, "\"nat_type\" : \"snat\", ");
 	else if (nat->type == NFT_NAT_DNAT)
-		ret = snprintf(buf, len, "\nat_type\" : \"dnat\", ");
+		ret = snprintf(buf, len, "\"nat_type\" : \"dnat\", ");
 
 	SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
 

--
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

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2013-08-09 11:44 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-09 11:11 [libnftables PATCH 01/13] src: expr: missing commas in json output support Alvaro Neira
2013-08-09 11:12 ` [libnftables PATCH 02/13] src: expr: missing curly braces " Alvaro Neira
2013-08-09 11:12 ` [libnftables PATCH 03/13] src: expr: change wrong value in data_reg Alvaro Neira
2013-08-09 11:12 ` [libnftables PATCH 04/13] src: fix display of compat_flag and compat_proto Alvaro Neira
2013-08-09 11:12 ` [libnftables PATCH 05/13] expr: ct: optional output in ct Alvaro Neira
2013-08-09 11:13 ` [libnftables PATCH 06/13] json: bitwise: add missing node len Alvaro Neira
2013-08-09 11:13 ` [libnftables PATCH 07/13] src: json: delete unneeded JSON prefixes Alvaro Neira
2013-08-09 11:13 ` [libnftables PATCH 08/13] expr: bytecode: add nft_str2ntoh function Alvaro Neira
2013-08-09 11:13 ` [libnftables PATCH 09/13] expr: cmp: add nft_str2cmp function Alvaro Neira
2013-08-09 11:13 ` [libnftables PATCH 10/13] expr: nat: add nft_str2nat function Alvaro Neira
2013-08-09 11:14 ` [libnftables PATCH 11/13] expr: payload: add nft_str2base function Alvaro Neira
2013-08-09 11:31   ` Arturo Borrero Gonzalez
2013-08-09 11:43     ` Pablo Neira Ayuso
2013-08-09 11:34   ` Arturo Borrero Gonzalez
2013-08-09 11:14 ` [libnftables PATCH 12/13] example: nft-rule-get: family parameter added Alvaro Neira
2013-08-09 11:14 ` [libnftables PATCH 13/13] jansson: Add nft_jansson_family function Alvaro Neira
2013-08-09 11:44 ` [libnftables PATCH 01/13] src: expr: missing commas in json output support Pablo Neira Ayuso

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.