lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #46467] ip_frag() shouldn't modify pbuf in case of a r


From: Zach Smith
Subject: [lwip-devel] [bug #46467] ip_frag() shouldn't modify pbuf in case of a retransmission
Date: Tue, 18 Oct 2016 23:39:40 +0000 (UTC)
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36

Follow-up Comment #13, bug #46467 (project lwip):

I think I found the problem. In ip4_frag() just after the loop where the
mirrored pbufs are created (the while (left_to_copy) loop), the poff
adjustment should be:

[line 788]
poff += newpbuflen;
instead of
poff = newpbuflen;

poff starts at IP_HLEN and should be incremented through the pbuf as fragments
of it are sent - because now it is an offset from the original pbuf payload.

I changed that line and the fragmenting now works for me. Re-transmissions of
the fragments work too.

My application always sends with contiguous pbufs (PBUF_RAM) but the code
looks like it will also work for chained pbufs. I stepped through with my
debugger and created a fake chained pbuf to see if it would handle it and it
seemed to do it correctly.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?46467>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]