]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[tcp] Set PSH flag only on packets containing data
authorMichael Brown <mcb30@ipxe.org>
Thu, 11 Nov 2010 01:14:05 +0000 (01:14 +0000)
committerMichael Brown <mcb30@ipxe.org>
Thu, 11 Nov 2010 01:14:05 +0000 (01:14 +0000)
Suggested-by: Yelena Kadach <klenusik@hotmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/net/tcp.c

index 420640346f6f9c23ba0659fc98bbc8815c09bb54..c3104771222871158bf2725ce1e70f0eb56b7c27 100644 (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 ) );