diff options
author | Bob Hockney <zeus@ix.netcom.com> | 2012-12-19 12:34:57 -0700 |
---|---|---|
committer | Eric Leblond <eric@regit.org> | 2012-12-19 23:47:52 +0100 |
commit | 492e28053ff060c3aae63ab628c9600e81d8e5c4 (patch) | |
tree | 987e3f4e1ae1ae44fe0b08c13663957f7d84f339 | |
parent | 2fe41885926f9f0d9364d3437f15e3f2a3d23aeb (diff) |
Fix parsing of ipv6 flowlabel and tc fields
Mask should be applied after ntohl conversion.
-rw-r--r-- | filter/raw2packet/ulogd_raw2packet_BASE.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/filter/raw2packet/ulogd_raw2packet_BASE.c b/filter/raw2packet/ulogd_raw2packet_BASE.c index d0fcdfa..05141b8 100644 --- a/filter/raw2packet/ulogd_raw2packet_BASE.c +++ b/filter/raw2packet/ulogd_raw2packet_BASE.c @@ -784,9 +784,9 @@ static int _interp_ipv6hdr(struct ulogd_pluginstance *pi, u_int32_t len) okey_set_u128(&ret[KEY_IP_DADDR], &ipv6h->ip6_dst); okey_set_u16(&ret[KEY_IP6_PAYLOAD_LEN], ntohs(ipv6h->ip6_plen)); okey_set_u8(&ret[KEY_IP6_PRIORITY], - ntohl(ipv6h->ip6_flow & 0x0ff00000) >> 20); + (ntohl(ipv6h->ip6_flow) & 0x0ff00000) >> 20); okey_set_u32(&ret[KEY_IP6_FLOWLABEL], - ntohl(ipv6h->ip6_flow & 0x000fffff)); + ntohl(ipv6h->ip6_flow) & 0x000fffff); okey_set_u8(&ret[KEY_IP6_HOPLIMIT], ipv6h->ip6_hlim); curhdr = ipv6h->ip6_nxt; |