buglwIP - A Lightweight TCP/IP stack - Bugs: bug #26010, PSH bit not set correctly when...

 
 

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

bug #26010: PSH bit not set correctly when segments are merged

Submitted by:  Kieran Mansley <kieranm>
Submitted on:  Thu 26 Mar 2009 02:37:44 PM UTC  
 
Category: TCPSeverity: 3 - Normal
Item Group: Faulty BehaviourStatus: Fixed
Privacy: PublicAssigned to: Kieran Mansley <kieranm>
Open/Closed: ClosedPlanned Release: None
lwIP version: CVS Head

Tue 31 Mar 2009 10:56:37 AM UTC, comment #1:

Checked in as no objections. Resolving fixed.

Kieran Mansley <kieranm>
Project AdministratorIn charge of this item.
Thu 26 Mar 2009 02:37:44 PM UTC, original submission:

I've noticed that when we merge segments in tcp_enqueue, we fail to set the PSH bit correctly.

After merging the segment we free the tail, and so set our reference (seg) to that to NULL.

Later in the function we do this:

if (seg != NULL && seglen > 0 && seg->tcphdr != NULL &&
((apiflags & TCP_WRITE_FLAG_MORE)==0)) {
TCPH_SET_FLAG(seg->tcphdr, TCP_PSH);
}

By setting seg to NULL we prevent the setting of the PSH flag, even though we would had the segments not been merged.

I propose setting seg = useg (and seglen = useg->len) instead of to NULL. This will mean the code that sets the PSH flag should then work correctly.

Patch attached. Any objections?

Kieran Mansley <kieranm>
Project AdministratorIn charge of this item.

 

Attached Files
file #17806:  psh added by kieranm (417B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by kieranm (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 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 31 Mar 2009 10:56:37 AM UTCkieranmStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Thu 26 Mar 2009 02:37:44 PM UTCkieranmAttached File-=>Added psh, #17806

    Back to the top


    Powered by Savane 3.1-cleanup1