[tcp] Set PSH flag only on packets containing data

Suggested-by: Yelena Kadach <klenusik@hotmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
pull/1/head
Michael Brown 2010-11-11 01:14:05 +00:00
parent 98b3599a65
commit 67dc832d15
1 changed files with 1 additions and 1 deletions

View File

@ -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 ) );