From owner-p4-projects@FreeBSD.ORG Sun Jun 14 19:35:19 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4DB381065672; Sun, 14 Jun 2009 19:35:19 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D740106566C for ; Sun, 14 Jun 2009 19:35:19 +0000 (UTC) (envelope-from anchie@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id F02E98FC1C for ; Sun, 14 Jun 2009 19:35:18 +0000 (UTC) (envelope-from anchie@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n5EJZIJW065240 for ; Sun, 14 Jun 2009 19:35:18 GMT (envelope-from anchie@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n5EJZIJS065238 for perforce@freebsd.org; Sun, 14 Jun 2009 19:35:18 GMT (envelope-from anchie@FreeBSD.org) Date: Sun, 14 Jun 2009 19:35:18 GMT Message-Id: <200906141935.n5EJZIJS065238@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to anchie@FreeBSD.org using -f From: Ana Kukec To: Perforce Change Reviews Cc: Subject: PERFORCE change 164371 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: Sun, 14 Jun 2009 19:35:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=164371 Change 164371 by anchie@anchie_malimis on 2009/06/14 19:34:42 Fixing the length of message passed to output hook. Affected files ... .. //depot/projects/soc2009/anchie_send/src/sys/netinet6/icmp6.c#7 edit .. //depot/projects/soc2009/anchie_send/src/sys/netinet6/nd6.c#4 edit Differences ... ==== //depot/projects/soc2009/anchie_send/src/sys/netinet6/icmp6.c#7 (text+ko) ==== @@ -428,7 +428,7 @@ */ ip6 = mtod(m, struct ip6_hdr *); - ip6len = ip6->ip6_plen; + ip6len = sizeof(struct ip6_hdr) + ntohs(ip6->ip6_plen); if (icmp6len < sizeof(struct icmp6_hdr)) { ICMP6STAT_INC(icp6s_tooshort); goto freeit; ==== //depot/projects/soc2009/anchie_send/src/sys/netinet6/nd6.c#4 (text+ko) ==== @@ -1728,8 +1728,10 @@ int error = 0; int flags = 0; int in = -1; + int ip6len = -1; ip6 = mtod(m, struct ip6_hdr *); + ip6len = ntohs(ip6->ip6_plen) + sizeof(struct ip6_hdr); #ifdef INVARIANTS if (lle != NULL) { @@ -1909,7 +1911,7 @@ /* send outgoing SeND/ND packet to sendd. */ in = 0; if (send_output_hook != NULL) - send_output_hook(in, ifp, m, ip6->ip6_plen); + send_output_hook(in, ifp, m, ip6len); /* * We were passed in a pointer to an lle with the lock held