All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
To: netfilter-devel@vger.kernel.org
Cc: pablo@netfilter.org
Subject: [libnftnl PATCH] common: fix unconditional output of event wrapping stuff
Date: Mon, 28 Apr 2014 12:58:38 +0200	[thread overview]
Message-ID: <20140428105837.18312.91126.stgit@nfdev.cica.es> (raw)

We can't unconditionally print out these strings.

Before this patch, objects being printed will be treated as an 'unkown' event.

Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
---
 src/common.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/common.c b/src/common.c
index 929f25d..52e5f0e 100644
--- a/src/common.c
+++ b/src/common.c
@@ -72,6 +72,9 @@ int nft_event_header_snprintf(char *buf, size_t size, uint32_t type,
 {
 	int ret = 0;
 
+	if (!(flags & NFT_OF_EVENT_ANY))
+		return 0;
+
 	switch (type) {
 	case NFT_OUTPUT_XML:
 		if (flags & NFT_OF_EVENT_NEW) {


             reply	other threads:[~2014-04-28 10:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-28 10:58 Arturo Borrero Gonzalez [this message]
2014-04-28 14:25 ` [libnftnl PATCH] common: fix unconditional output of event wrapping stuff Pablo 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=20140428105837.18312.91126.stgit@nfdev.cica.es \
    --to=arturo.borrero.glez@gmail.com \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.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 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.