[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #26010] PSH bit not set correctly when segments are me
From: |
Kieran Mansley |
Subject: |
[lwip-devel] [bug #26010] PSH bit not set correctly when segments are merged |
Date: |
Thu, 26 Mar 2009 14:37:46 +0000 |
User-agent: |
Opera/9.21 (X11; Linux i686; U; en) |
URL:
<http://savannah.nongnu.org/bugs/?26010>
Summary: PSH bit not set correctly when segments are merged
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: kieranm
Submitted on: Thu 26 Mar 2009 14:37:44 GMT
Category: TCP
Severity: 3 - Normal
Item Group: Faulty Behaviour
Status: None
Privacy: Public
Assigned to: kieranm
Open/Closed: Open
Discussion Lock: Any
Planned Release: 1.3.1
lwIP version: CVS Head
_______________________________________________________
Details:
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?
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Thu 26 Mar 2009 14:37:44 GMT Name: psh Size: 417B By: kieranm
<http://savannah.nongnu.org/bugs/download.php?file_id=17806>
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?26010>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [lwip-devel] [bug #26010] PSH bit not set correctly when segments are merged,
Kieran Mansley <=