Re: in_cksum_offset(), in_delayed_cksum_offset() question
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Kevin, Yes, this was a long-standing bug that has been fixed recently along with the mbuf_outbound_finalize() byte-ordering issue. The fix should be available fairly soon. Adi On Jan 23, 2007, at 10:13 AM, Kevin Brock wrote: Kevin Brock apple@kevin.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/adi%40apple.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com Both of these take an offset for the IP header, and then try to find the mbuf in the chain that contains the IP header. What I was wondering about was the line below: if(m)... This first loop occurs in both of the functions. It looks as though the function will simply return if the IP header isn't in the first mbuf. It should be if(!m), to detect the condition where we've reached the end of the mbuf without finding the IP offset... Am I missing something here? If it simply returns any time the IP header isn't in the first mbuf, then mbuf_outbound_finalize, which calls these functions, will clear the checksum request flags without actually doing anything. void in_delayed_cksum_offset(struct mbuf *m, int ip_offset) { struct ip *ip; u_short csum, offset; while (ip_offset > m->m_len) { ip_offset -= m->m_len; m = m->m_next; if (m) { printf("in_delayed_cksum_withoffset failed - ip_offset wasn't in the packet\n"); return; } } This email sent to adi@apple.com smime.p7s
participants (1)
-
Adi Masputra