Skip to contentSkip to conversation

common: fix unconditional output of event wrapping stuff

PATCH Applied Arturo Borrero Gonzalez 2 participants 2 messages Apr 28, 2014 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 src/common.c |    3 +++
 1 file changed, 3 insertions(+)
src/common.c +3 -0
index 929f25d..52e5f0e 100644
@@ -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) {
maintainer Applied
#1 lore raw
Quoted 3 lines · Arturo Borrero Gonzalez

We can't unconditionally print out these strings.

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

Applied, thanks Arturo.