From 9c3d1b12b2ceafd92336048985fac57f048d6e19 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Sun, 11 Jul 2010 16:33:41 +0200 Subject: nflog: do not default to NFLOG_XML_HW in nflog_snprintf_xml() If no flags are passed to nflog_snprintf_xml(), we print: This is not very useful but, at least, it is a way to show that nflog_snprintf_xml() is working correctly (even if no flags were passed). Signed-off-by: Pablo Neira Ayuso --- src/libnetfilter_log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libnetfilter_log.c b/src/libnetfilter_log.c index cad78aa..4566b4c 100644 --- a/src/libnetfilter_log.c +++ b/src/libnetfilter_log.c @@ -553,7 +553,7 @@ int nflog_snprintf_xml(char *buf, size_t rem, struct nflog_data *tb, int flags) } ph = nflog_get_msg_packet_hdr(tb); - if (ph) { + if (ph && (flags & NFLOG_XML_HW)) { size = snprintf(buf + offset, rem, "%u", ph->hook); SNPRINTF_FAILURE(size, rem, offset, len); -- cgit v1.2.3