mirror of https://github.com/ipxe/ipxe.git
[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
parent
98b3599a65
commit
67dc832d15
|
|
@ -522,7 +522,7 @@ static int tcp_xmit ( struct tcp_connection *tcp ) {
|
||||||
tsopt->tsopt.tsval = htonl ( currticks() );
|
tsopt->tsopt.tsval = htonl ( currticks() );
|
||||||
tsopt->tsopt.tsecr = htonl ( tcp->ts_recent );
|
tsopt->tsopt.tsecr = htonl ( tcp->ts_recent );
|
||||||
}
|
}
|
||||||
if ( ! ( flags & TCP_SYN ) )
|
if ( len != 0 )
|
||||||
flags |= TCP_PSH;
|
flags |= TCP_PSH;
|
||||||
tcphdr = iob_push ( iobuf, sizeof ( *tcphdr ) );
|
tcphdr = iob_push ( iobuf, sizeof ( *tcphdr ) );
|
||||||
memset ( tcphdr, 0, sizeof ( *tcphdr ) );
|
memset ( tcphdr, 0, sizeof ( *tcphdr ) );
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue