瀏覽代碼

[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 14 年之前
父節點
當前提交
67dc832d15
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      src/net/tcp.c

+ 1
- 1
src/net/tcp.c 查看文件

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

Loading…
取消
儲存