summaryrefslogtreecommitdiffstats
path: root/src/net/tcp.c
diff options
context:
space:
mode:
authorMichael Brown2010-11-11 02:14:05 +0100
committerMichael Brown2010-11-11 02:14:05 +0100
commit67dc832d152bbbaa6c3046eb68e876d2527beb9a (patch)
tree562c43a0f2c7d24302614ed50663faa5f8cbd7d2 /src/net/tcp.c
parent[list] Fix typographical error from previous commit (diff)
downloadipxe-67dc832d152bbbaa6c3046eb68e876d2527beb9a.tar.gz
ipxe-67dc832d152bbbaa6c3046eb68e876d2527beb9a.tar.xz
ipxe-67dc832d152bbbaa6c3046eb68e876d2527beb9a.zip
[tcp] Set PSH flag only on packets containing data
Suggested-by: Yelena Kadach <klenusik@hotmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net/tcp.c')
-rw-r--r--src/net/tcp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net/tcp.c b/src/net/tcp.c
index 42064034..c3104771 100644
--- a/src/net/tcp.c
+++ b/src/net/tcp.c
@@ -522,7 +522,7 @@ static int tcp_xmit ( struct tcp_connection *tcp ) {
tsopt->tsopt.tsval = htonl ( currticks() );
tsopt->tsopt.tsecr = htonl ( tcp->ts_recent );
}
- if ( ! ( flags & TCP_SYN ) )
+ if ( len != 0 )
flags |= TCP_PSH;
tcphdr = iob_push ( iobuf, sizeof ( *tcphdr ) );
memset ( tcphdr, 0, sizeof ( *tcphdr ) );