Date: Tue, 27 Jun 2006 09:03:58 GMT From: Clément Lecigne <clem1@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 100127 for review Message-ID: <200606270903.k5R93wub015301@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=100127 Change 100127 by clem1@clem1_ipv6vulns on 2006/06/27 09:03:40 improvements around ipv6 fragmentation extension header. Affected files ... .. //depot/projects/soc2006/clem1_ipv6vulns/libnet/include/libnet/libnet-functions.h#5 edit .. //depot/projects/soc2006/clem1_ipv6vulns/libnet/include/libnet/libnet-headers.h#4 edit .. //depot/projects/soc2006/clem1_ipv6vulns/libnet/src/libnet_build_ip.c#2 edit Differences ... ==== //depot/projects/soc2006/clem1_ipv6vulns/libnet/include/libnet/libnet-functions.h#5 (text+ko) ==== @@ -1095,7 +1095,8 @@ * Builds a version 6 RFC 2460 Internet Protocol (IP) fragmentation header. * @param nh next header * @param reserved unused value... OR IS IT! - * @param frag fragmentation bits (ala ipv4) + * @param offset fragmentation bits (ala ipv4) + * @param m flag (more fragment or NOT) * @param id packet identification * @param payload optional payload or NULL * @param payload_s payload length or 0 @@ -1104,8 +1105,8 @@ * @return protocol tag value on success, -1 on error */ libnet_ptag_t -libnet_build_ipv6_frag(u_int8_t nh, u_int8_t reserved, u_int16_t frag, -u_int32_t id, u_int8_t *payload, u_int32_t payload_s, libnet_t *l, +libnet_build_ipv6_frag(u_int8_t nh, u_int8_t reserved, u_int16_t offset, +u_int8_t m, u_int32_t id, u_int8_t *payload, u_int32_t payload_s, libnet_t *l, libnet_ptag_t ptag); /** ==== //depot/projects/soc2006/clem1_ipv6vulns/libnet/include/libnet/libnet-headers.h#4 (text+ko) ==== ==== //depot/projects/soc2006/clem1_ipv6vulns/libnet/src/libnet_build_ip.c#2 (text+ko) ==== @@ -528,9 +528,9 @@ } libnet_ptag_t -libnet_build_ipv6_frag(u_int8_t nh, u_int8_t reserved, u_int16_t frag, -u_int32_t id, u_int8_t *payload, u_int32_t payload_s, libnet_t *l, -libnet_ptag_t ptag) +libnet_build_ipv6_frag(u_int8_t nh, u_int8_t reserved, u_int16_t offset, +u_int8_t m, u_int32_t id, u_int8_t *payload, u_int32_t payload_s, +libnet_t *l, libnet_ptag_t ptag) { u_int32_t n; u_int16_t h; @@ -565,8 +565,8 @@ memset(&ipv6_frag_hdr, 0 , sizeof(ipv6_frag_hdr)); ipv6_frag_hdr.ip_nh = nh; ipv6_frag_hdr.ip_reserved = reserved; - ipv6_frag_hdr.ip_frag = frag; - ipv6_frag_hdr.ip_id = id; + ipv6_frag_hdr.ip_frag = htons((offset << 3) + (m)); + ipv6_frag_hdr.ip_id = htonl(id); /* * Appened the protocol unit to the list.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606270903.k5R93wub015301>