From owner-p4-projects@FreeBSD.ORG Tue Jun 27 09:03:59 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B3ED916A403; Tue, 27 Jun 2006 09:03:59 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 77D8F16A400 for ; Tue, 27 Jun 2006 09:03:59 +0000 (UTC) (envelope-from clem1@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CF1D843D67 for ; Tue, 27 Jun 2006 09:03:58 +0000 (GMT) (envelope-from clem1@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k5R93wLv015304 for ; Tue, 27 Jun 2006 09:03:58 GMT (envelope-from clem1@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k5R93wub015301 for perforce@freebsd.org; Tue, 27 Jun 2006 09:03:58 GMT (envelope-from clem1@FreeBSD.org) Date: Tue, 27 Jun 2006 09:03:58 GMT Message-Id: <200606270903.k5R93wub015301@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to clem1@FreeBSD.org using -f From: Clément Lecigne To: Perforce Change Reviews Cc: Subject: PERFORCE change 100127 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2006 09:03:59 -0000 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.