buglwIP - A Lightweight TCP/IP stack - Bugs: bug #20429, Potential problem with IP...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #20429: Potential problem with IP Fragmentation and TCPRetransmit

Submitted by:  Simon Goldschmidt <goldsimon>
Submitted on:  Tue 10 Jul 2007 08:18:46 AM UTC  
 
Category: IPv4Severity: 4 - Important
Item Group: Crash ErrorStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned Release: None
lwIP version: None

Wed 22 Aug 2007 08:07:16 PM UTC, comment #2:

Why was this still open when it's marked as fixed???

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Wed 25 Jul 2007 06:55:55 PM UTC, comment #1:

The solution is simple: just don't use copy_from_pbuf(). I've changed the code to use pbuf_copy_partial(), which I created from netbuf_copy_partial(). A nice side-effect is that netbuf_copy_partial() now also uses pbuf_copy_partial(), which saves some redundant code.

Thomas, could you verify the changes, even if it's not 1.1.0 but CVS HEAD?

BTW: why do you use such an old version, anyway? g

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Tue 10 Jul 2007 08:18:46 AM UTC, original submission:

Tom Hennen wrote on lwip-users (http://lists.nongnu.org/archive/html/lwip-users/2007-07/msg00011.html):

I've run into what may be a problem with IP Fragmentation when combined with TCP Retransmit in lwip 1.1.1 (I'm not sure if this problem exists in 1.2).

It seems that ip_frag (via copy_from_pbuf) modifies the pbuf given to it. During normal operation this is fine; it causes problems when TCP tries to retransmit a segment that has already been fragmented. In that case the pbuf's len and payload pointers will be incorrect (thanks to the first call to ip_frag) and this can cause errors during the second call to ip_frag.

I'm not quite sure what the correct solution is. Either a copy of the pbuf chain could be made (minus the payloads) or copy_from_pbuf could be modified so as not to change the state of the pbuf (or at least restore it once it's done).

Thoughts?

Thanks,

Tom Hennen

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by kieranm (Updated the item)
  • -unavailable- added by goldsimon (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 22 Aug 2007 08:07:16 PM UTCgoldsimonOpen/ClosedOpen=>Closed
    Wed 25 Jul 2007 06:55:55 PM UTCgoldsimonStatusNone=>Fixed
      Assigned toNone=>goldsimon
    Fri 13 Jul 2007 11:49:31 AM UTCkieranmPlanned Release=>1.3.0

    Back to the top


    Powered by Savane 3.1-cleanup1