summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2010-07-11 14:54:19 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2010-07-11 14:54:19 +0200
commit9d37fa4d4cd3ab5ab39063683a41a176f28dd6b0 (patch)
tree640e2cb49d8383017ea96902d492f2883d382e62
parent8d6699e7e286ab7d64c896384ccdd77d55130cb5 (diff)
nflog: remove `0x' from HW protocol in output of nflog_snprintf_xml()
This patch removes the prefix `0x' of the HW protocol. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--src/libnetfilter_log.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libnetfilter_log.c b/src/libnetfilter_log.c
index 0e49e62..cad78aa 100644
--- a/src/libnetfilter_log.c
+++ b/src/libnetfilter_log.c
@@ -561,7 +561,7 @@ int nflog_snprintf_xml(char *buf, size_t rem, struct nflog_data *tb, int flags)
if (hwph && (flags & NFLOG_XML_HW)) {
int i, hlen = ntohs(hwph->hw_addrlen);
- size = snprintf(buf + offset, rem, "<hw><proto>0x%04x"
+ size = snprintf(buf + offset, rem, "<hw><proto>%04x"
"</proto>",
ntohs(ph->hw_protocol));
SNPRINTF_FAILURE(size, rem, offset, len);
@@ -578,7 +578,7 @@ int nflog_snprintf_xml(char *buf, size_t rem, struct nflog_data *tb, int flags)
size = snprintf(buf + offset, rem, "</src></hw>");
SNPRINTF_FAILURE(size, rem, offset, len);
} else if (flags & NFLOG_XML_HW) {
- size = snprintf(buf + offset, rem, "<hw><proto>0x%04x"
+ size = snprintf(buf + offset, rem, "<hw><proto>%04x"
"</proto></hw>",
ntohs(ph->hw_protocol));
SNPRINTF_FAILURE(size, rem, offset, len);