From: /C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net Date: Sat, 12 Jan 2008 14:47:47 +0000 (+0000) Subject: [PATCH 2/5] Dont ntohs() mac_len of ULOG, since it is not in network byte order X-Git-Tag: ulogd-2.0.0beta2~157 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f1e9ef46b34d27557da82e17aeed0b4aa8e4e5c8;p=thirdparty%2Fulogd2.git [PATCH 2/5] Dont ntohs() mac_len of ULOG, since it is not in network byte order Stores mac_len correctly, since within ULOG structire it is not stored in network byte order. Signed-off-by: Peter Warasin --- diff --git a/input/packet/ulogd_inppkt_ULOG.c b/input/packet/ulogd_inppkt_ULOG.c index 6298e41..853bf2c 100644 --- a/input/packet/ulogd_inppkt_ULOG.c +++ b/input/packet/ulogd_inppkt_ULOG.c @@ -167,7 +167,7 @@ static int interp_packet(struct ulogd_pluginstance *ip, ulog_packet_msg_t *pkt) if (pkt->mac_len) { ret[ULOG_KEY_RAW_MAC].u.value.ptr = pkt->mac; ret[ULOG_KEY_RAW_MAC].flags |= ULOGD_RETF_VALID; - ret[ULOG_KEY_RAW_MAC_LEN].u.value.ui16 = ntohs(pkt->mac_len); + ret[ULOG_KEY_RAW_MAC_LEN].u.value.ui16 = pkt->mac_len; ret[ULOG_KEY_RAW_MAC_LEN].flags |= ULOGD_RETF_VALID; }