• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: in_cksum_offset(), in_delayed_cksum_offset() question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: in_cksum_offset(), in_delayed_cksum_offset() question


  • Subject: Re: in_cksum_offset(), in_delayed_cksum_offset() question
  • From: Adi Masputra <email@hidden>
  • Date: Tue, 23 Jan 2007 10:19:07 -0800

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:

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;
}
}


Kevin Brock
email@hidden


_______________________________________________ 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

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

  • Follow-Ups:
    • Re: in_cksum_offset(), in_delayed_cksum_offset() question
      • From: Kevin Brock <email@hidden>
References: 
 >in_cksum_offset(), in_delayed_cksum_offset() question (From: Kevin Brock <email@hidden>)

  • Prev by Date: in_cksum_offset(), in_delayed_cksum_offset() question
  • Next by Date: Re: in_cksum_offset(), in_delayed_cksum_offset() question
  • Previous by thread: in_cksum_offset(), in_delayed_cksum_offset() question
  • Next by thread: Re: in_cksum_offset(), in_delayed_cksum_offset() question
  • Index(es):
    • Date
    • Thread