Date: Sun, 14 Jun 2009 19:35:18 GMT From: Ana Kukec <anchie@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 164371 for review Message-ID: <200906141935.n5EJZIJS065238@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906141935.n5EJZIJS065238>