From: /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org Date: Sat, 5 Apr 2008 15:04:49 +0000 (+0000) Subject: Length of MAC address was set to big and thus display was wrong. This X-Git-Tag: ulogd-2.0.0beta2~76 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=daf62dea90ce6c765e53e7713ec3835309eb9a0d;p=thirdparty%2Fulogd2.git Length of MAC address was set to big and thus display was wrong. This misbehaviour was also causing to read datas out of the correct range. Signed-off-by: Eric Leblond --- diff --git a/util/printpkt.c b/util/printpkt.c index 6636ac3..b62eed8 100644 --- a/util/printpkt.c +++ b/util/printpkt.c @@ -428,7 +428,7 @@ int printpkt_print(struct ulogd_key *res, char *buf) /* FIXME: configurable */ if (pp_is_valid(res, KEY_RAW_MAC)) { unsigned char *mac = (unsigned char *) GET_VALUE(res, KEY_RAW_MAC).ptr; - int i, len = GET_VALUE(res, KEY_RAW_MACLEN).ui16 * 2; + int i, len = GET_VALUE(res, KEY_RAW_MACLEN).ui16; buf_cur += sprintf(buf_cur, "MAC="); for (i = 0; i < len; i++)