PERFORCE change 164371 for review
Ana Kukec
anchie at FreeBSD.org
Sun Jun 14 19:35:20 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=164371
Change 164371 by anchie at 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
More information about the p4-projects
mailing list