netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alvaro Neira Ayuso <alvaroneay@gmail.com>
To: netfilter-devel@vger.kernel.org
Subject: [libnftnl PATCH] buffer: fix a bug in nft_buf_close passing the tag to close the xml elements.
Date: Mon,  9 Feb 2015 21:09:52 +0100	[thread overview]
Message-ID: <1423512596-29777-1-git-send-email-alvaroneay@gmail.com> (raw)

Signed-off-by: Alvaro Neira Ayuso <alvaroneay@gmail.com>
---
 src/buffer.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/buffer.c b/src/buffer.c
index d64f944..4cedb9e 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -75,7 +75,7 @@ int nft_buf_close(struct nft_buf *b, int type, const char *tag)
 {
 	switch (type) {
 	case NFT_OUTPUT_XML:
-		return nft_buf_put(b, "</%s>");
+		return nft_buf_put(b, "</%s>", tag);
 	case NFT_OUTPUT_JSON:
 		/* Remove trailing comma in json */
 		if (b->size > 0 && b->buf[b->size - 1] == ',') {
-- 
1.7.10.4


             reply	other threads:[~2015-02-09 20:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-09 20:09 Alvaro Neira Ayuso [this message]
2015-02-09 20:09 ` [libnftnl PATCH 1/4 v8] src: add command tag in json/xml export support Alvaro Neira Ayuso
2015-02-09 20:09 ` [libnftnl PATCH 2/4 v8] src: add support to import json/xml with the new command syntax Alvaro Neira Ayuso
2015-02-09 20:09 ` [libnftnl PATCH 3/4 v8] example: Parse and create netlink message using the new parsing functions Alvaro Neira Ayuso
2015-02-09 20:09 ` [libnftnl PATCH 4/4 v8] test: update json/xml tests to the new syntax Alvaro Neira Ayuso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1423512596-29777-1-git-send-email-alvaroneay@gmail.com \
    --to=alvaroneay@gmail.com \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).