From 57107c23ffee7e5b4386e60e5764f40f31c591d8 Mon Sep 17 00:00:00 2001 From: Arturo Borrero Date: Mon, 28 Apr 2014 12:58:38 +0200 Subject: common: fix unconditional output of event wrapping stuff 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 Signed-off-by: Pablo Neira Ayuso --- src/common.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/common.c') 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) { -- cgit v1.2.3