patchlwIP - A Lightweight TCP/IP stack - Patches: patch #9610, tcp_out: Fix updating...


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

patch #9610: tcp_out: Fix updating remainder_flags in tcp_split_unsent_seg

Submitted by:  Axel Lin <axellin>
Submitted on:  Fri 30 Mar 2018 01:54:22 PM UTC  
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Planned Release:  None

Sat 31 Mar 2018 03:22:46 AM UTC, comment #2: 

Hi Joel,
Thanks for your review, patch applied with your ack.

Axel Lin <axellin>
Project Member
Fri 30 Mar 2018 05:23:26 PM UTC, comment #1: 


Great find, your patch is correct.

Using remainder is in fact a typo and remainder_flags was intended. 'remainder' is the size of unsent segment that is being split off into a new pbuf after unsent head is trimmed.

We have a unit test for the unsent segment splitting (see test_tcp_persist_split), but it currently doesn't test on FIN data packets (which is the only case this bug would present itself).

Joel Cunningham <jcunningham>
Project Member
Fri 30 Mar 2018 01:54:22 PM UTC, original submission:  

The code to migrate flags from original segment updating wrong variable so both remainder and remainder_flags may be incorrect. Fix it.

Fixes: f582c8833969 ("tcp: persist timer re-work (bug #50837)")

I cannot test it now and I might misunderstand the code, appreciate for review and test.

Axel Lin <axellin>
Project Member


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by jcunningham (Posted a comment)
  • -email is unavailable- added by axellin (Submitted the item)

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

    Only logged-in users can vote.




    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-03-31 axellin Open/ClosedOpen => Closed
    2018-03-31 axellin StatusNone => Done
    2018-03-30 axellin Attached File- => Added 0001-tcp_out-Fix-updating-remainder_flags-in-tcp_split_un.patch, #43726

    Back to the top

    Powered by Savane 3.5