Dan McDonald writes:
> Here's a fix:
>
> http://cr.opensolaris.org/~danmcd/6799166/
ip6.c:
8825: this looks a little too clever; I think the right code would
be simply:
if ((uint8_t *)ip6h < current_mp->b_wptr &&
(uint8_t *)ip6h >= current_mp->b_rptr)
(We care that the pointer lands in the "current" mblk, not the size
of the pointed-to object.)
(It'd be simpler just to require the caller to pass you the right
mblk. He must know it; otherwise, he couldn't have given you ip6h.
Doing that would get rid of this loop and the next issue entirely.)
8835: should be an ASSERT. If someone gives you an ip6h pointer
along with an mblk from some different packet, then you're doomed.
8852: seems a little weak; how can you assume this?
8859: looks more like "goto done" to me.
--
James Carlson, Solaris Networking <[email protected]>
Sun Microsystems / 35 Network Drive 71.232W Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677
_______________________________________________
networking-discuss mailing list
[email protected]