Re: mbuf_outbound_finalize() reports packet length is less than mbuf length
Re: mbuf_outbound_finalize() reports packet length is less than mbuf length
- Subject: Re: mbuf_outbound_finalize() reports packet length is less than mbuf length
- From: Kevin Brock <email@hidden>
- Date: Mon, 27 Jul 2009 12:42:05 -0700
Brendan Creane wrote:
I think the host order ip_len bug is fixed in xnu-1228.12.14, at line
1682 of ip_output.c, it's trying both the network and host order of
ip_len:
You're right--it looks like they fixed it... Pity I still need to
support some 10.4 systems, or I could clean out the hack there. Of
course they're counting 24 hours on a 12 hour clock now. Two values
will work for any packet. On the other hand NKE authors don't need to
worry about changing their code.
The code snippet I sent is being called in the output function of an
interface filter, and runs on 10.4-10-6. I double checked what I'm
doing in my code, and the only apparent difference is that I'm
calculating the value ip_offset from information in the L2 frame, i.e.,
checking for a SNAP hdr etc., rather than calling
ifnet_hdrlen(interface). I would expect ifnet_hdrlen() to return a
correct value though.
The code in ip_output for in_delayed_cksum_offset() looks like it would
work if you did an mbuf_pullup() to make the L2 and IP headers
contiguous in the same mbuf. Contiguous L2 frame and IP header would
mean they didn't zero out the ip_offset, and the math would work. I
notice that in_cksum_offset() does the calculations correctly--using m
not m0.
Kevin
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden