diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2010-07-11 16:33:41 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2010-07-11 16:33:41 +0200 |
commit | 9c3d1b12b2ceafd92336048985fac57f048d6e19 (patch) | |
tree | aeac44f18d12b70cb1c48caaa01e1641d2622a1a /src/libnetfilter_log.c | |
parent | 9d37fa4d4cd3ab5ab39063683a41a176f28dd6b0 (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>
Diffstat (limited to 'src/libnetfilter_log.c')
-rw-r--r-- | src/libnetfilter_log.c | 2 |
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); |