buglwIP - A Lightweight TCP/IP stack - Bugs: bug #52106, oversize mismatch when...

 
 

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

bug #52106: oversize mismatch when tcp_output_segment() fails

Submitted by:  Jens Nielsen <deft>
Submitted on:  Sun 24 Sep 2017 01:27:26 PM UTC  
 
Category: TCPSeverity: 3 - Normal
Item Group: Crash ErrorStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned Release: None
lwIP version: git head

Mon 25 Sep 2017 06:23:58 PM UTC, comment #2:

Pushed, thanks for the patch!

Axel, I lost this due to not being a bug entry...

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Sun 24 Sep 2017 03:41:10 PM UTC, comment #1:

Your fix is exactly the same as I post before:

http://lwip.100.n7.nabble.com/Re-lwip-users-Digest-Vol-162-Issue-1-td28572.html#a28590

Axel Lin <axellin>
Sun 24 Sep 2017 01:27:26 PM UTC, original submission:

When stress testing my application I once ran into the "unsent_oversize mismatch (pcb vs. last_unsent)" assert in tcp_write()

I believe the root cause is that tcp_output() will set seg->oversize_left to 0 before sending, and return without updating pcb->unsent_oversize if sending fails. Approx line 1225 in tcp_out.c on git head.

I had:

pcb->unsent_oversize = 732
pcb->unsent = last_unsent
last_unsent->len = 728
last_unsent->oversize = 0
pcb->flags with TF_NAGLEMEMERR set

So it fits the scenario, and I think it's a bug that should be fixed anyway. Attached patch proposes a simple solution to just move seg->oversize_left = 0; to after sending but I don't know if that has any other implications

Version was 2.0.3 (not available in drop-down) but git head looks similar

Jens Nielsen <deft>

 

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by goldsimon (Posted a comment)
  • -unavailable- added by axellin (Posted a comment)
  • -unavailable- added by deft (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
    Mon 25 Sep 2017 06:23:58 PM UTCgoldsimonStatusNone=>Fixed
      Assigned toNone=>goldsimon
      Open/ClosedOpen=>Closed
    Sun 24 Sep 2017 01:27:26 PM UTCdeftAttached File-=>Added 0001-Clear-seg-oversize_left-after-sending-OK.patch, #41886

    Back to the top


    Powered by Savane 3.1-cleanup1