summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2010-07-11 16:33:41 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2010-07-11 16:33:41 +0200
commit9c3d1b12b2ceafd92336048985fac57f048d6e19 (patch)
treeaeac44f18d12b70cb1c48caaa01e1641d2622a1a
parent9d37fa4d4cd3ab5ab39063683a41a176f28dd6b0 (diff)
nflog: do not default to NFLOG_XML_HW in nflog_snprintf_xml()
If no flags are passed to nflog_snprintf_xml(), we print: <log></log> 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 <pablo@netfilter.org>
-rw-r--r--src/libnetfilter_log.c2
1 files changed, 1 insertions, 1 deletions
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, "<hook>%u</hook>", ph->hook);
SNPRINTF_FAILURE(size, rem, offset, len);