Browse Source

[tcp] Set PSH flag only on packets containing data

Suggested-by: Yelena Kadach <klenusik@hotmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 13 years ago
parent
commit
67dc832d15
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/net/tcp.c

+ 1
- 1
src/net/tcp.c View File

@@ -522,7 +522,7 @@ static int tcp_xmit ( struct tcp_connection *tcp ) {
522 522
 		tsopt->tsopt.tsval = htonl ( currticks() );
523 523
 		tsopt->tsopt.tsecr = htonl ( tcp->ts_recent );
524 524
 	}
525
-	if ( ! ( flags & TCP_SYN ) )
525
+	if ( len != 0 )
526 526
 		flags |= TCP_PSH;
527 527
 	tcphdr = iob_push ( iobuf, sizeof ( *tcphdr ) );
528 528
 	memset ( tcphdr, 0, sizeof ( *tcphdr ) );

Loading…
Cancel
Save