From f1e9ef46b34d27557da82e17aeed0b4aa8e4e5c8 Mon Sep 17 00:00:00 2001 From: "/C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net" Date: Sat, 12 Jan 2008 14:47:47 +0000 Subject: [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 --- input/packet/ulogd_inppkt_ULOG.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'input/packet/ulogd_inppkt_ULOG.c') 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; } -- cgit v1.2.3