summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2010-07-11 14:51:31 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2010-07-11 14:51:31 +0200
commit8d6699e7e286ab7d64c896384ccdd77d55130cb5 (patch)
treedb819c1fa0b711bccca5514dc938fca92e16d836
parent899706c44d6391ca0f0ea83609e507b986c88789 (diff)
nflog: fix HW address output in nfq_snprintf_xml()
This patch fixes the output of the HW address in XML files: <src>800:800:800:800:800:</src> now it looks fine: <src>0019a917a400</src> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--src/libnetfilter_log.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libnetfilter_log.c b/src/libnetfilter_log.c
index 7ace0d6..0e49e62 100644
--- a/src/libnetfilter_log.c
+++ b/src/libnetfilter_log.c
@@ -569,9 +569,9 @@ int nflog_snprintf_xml(char *buf, size_t rem, struct nflog_data *tb, int flags)
size = snprintf(buf + offset, rem, "<src>");
SNPRINTF_FAILURE(size, rem, offset, len);
- for (i=0; i<hlen-1; i++) {
- size = snprintf(buf + offset, rem, "%02x:",
- ntohs(ph->hw_protocol));
+ for (i=0; i<hlen; i++) {
+ size = snprintf(buf + offset, rem, "%02x",
+ hwph->hw_addr[i]);
SNPRINTF_FAILURE(size, rem, offset, len);
}