summaryrefslogtreecommitdiff
path: root/community/ulogd/mac-addr.patch
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-01-27 23:15:06 +0000
committerroot <root@rshg054.dnsready.net>2012-01-27 23:15:06 +0000
commit2493f16093b14a81e949bd6a1b89724cb931807d (patch)
treeb93ed56dddfb9e067d0e29e363bc8e98286b9ac8 /community/ulogd/mac-addr.patch
parent3741146d50cb93e8985f8aac937e36d35ee76446 (diff)
Fri Jan 27 23:15:06 UTC 2012
Diffstat (limited to 'community/ulogd/mac-addr.patch')
-rw-r--r--community/ulogd/mac-addr.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/community/ulogd/mac-addr.patch b/community/ulogd/mac-addr.patch
new file mode 100644
index 000000000..87a76a22b
--- /dev/null
+++ b/community/ulogd/mac-addr.patch
@@ -0,0 +1,22 @@
+--- ulogd_BASE.c-save 2007-08-06 11:23:53.000000000 +0200
++++ ulogd_BASE.c 2007-08-06 11:28:47.000000000 +0200
+@@ -63,7 +63,7 @@ static ulog_iret_t *_interp_raw(ulog_int
+ {
+ unsigned char *p;
+ int i;
+- char *buf, *oldbuf = NULL;
++ char *buf = NULL;
+ ulog_iret_t *ret = ip->result;
+
+ if (pkt->mac_len) {
+@@ -75,9 +75,8 @@ static ulog_iret_t *_interp_raw(ulog_int
+ *buf = '\0';
+
+ p = pkt->mac;
+- oldbuf = buf;
+ for (i = 0; i < pkt->mac_len; i++, p++)
+- sprintf(buf, "%s%02x%c", oldbuf, *p, i==pkt->mac_len-1 ? ' ':':');
++ sprintf(buf + (i*3), "%02x%c", *p, i==pkt->mac_len-1 ? ' ':':');
+ ret[0].value.ptr = buf;
+ ret[0].flags |= ULOGD_RETF_VALID;
+ }