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

Submitter:  Kieran Mansley <kieranm>
Submitted:  Thu 26 Mar 2009 02:37:44 PM UTC
   
 
Category:  TCP Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  Fixed
Privacy:  Public Assigned to:  kieranm
Open/Closed:  Closed Planned 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>
Group Member
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>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

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
  • -email is unavailable- added by kieranm (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-03-31 kieranm StatusNone Fixed
        Open/ClosedOpen Closed
    2009-03-26 kieranm Attached File- Added psh, #17806

    Back to the top

    Powered by Savane 3.13-bb6a.
    Corresponding source code