summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2010-07-11 15:08:40 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2010-07-11 15:08:40 +0200
commit9ba33008d3f7b45c5004943768822f1990d2cd0b (patch)
tree36b2005bce4ae3762b946280a5fad002ce30df78
parent5781d53eec107bcf517fde7383a230f33311a116 (diff)
nfq: remove `0x' from HW protocol in output of nfq_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_queue.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libnetfilter_queue.c b/src/libnetfilter_queue.c
index 7269042..97bb49e 100644
--- a/src/libnetfilter_queue.c
+++ b/src/libnetfilter_queue.c
@@ -1087,7 +1087,7 @@ int nfq_snprintf_xml(char *buf, size_t rem, struct nfq_data *tb, int flags)
if (hwph && (flags & NFQ_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);
@@ -1104,7 +1104,7 @@ int nfq_snprintf_xml(char *buf, size_t rem, struct nfq_data *tb, int flags)
size = snprintf(buf + offset, rem, "</src></hw>");
SNPRINTF_FAILURE(size, rem, offset, len);
} else if (flags & NFQ_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);