[libnftnl PATCH] common: fix unconditional output of event wrapping stuff

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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) {

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux