diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2010-07-11 15:00:13 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2010-07-11 15:00:13 +0200 |
commit | 5781d53eec107bcf517fde7383a230f33311a116 (patch) | |
tree | e8cd308928fbe71b7b5da530f7d11053c3db1102 | |
parent | b775a05ba376c68615fe5134ce291889c035f844 (diff) |
nfq: 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_queue.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libnetfilter_queue.c b/src/libnetfilter_queue.c index 7da16be..7269042 100644 --- a/src/libnetfilter_queue.c +++ b/src/libnetfilter_queue.c @@ -1095,9 +1095,9 @@ int nfq_snprintf_xml(char *buf, size_t rem, struct nfq_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); } |