瀏覽代碼

[tcp] Use a zero window size for RST packets

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 12 年之前
父節點
當前提交
49ac629821
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      src/net/tcp.c

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

@@ -714,7 +714,7 @@ static int tcp_xmit_reset ( struct tcp_connection *tcp,
714 714
 	tcphdr->ack = in_tcphdr->seq;
715 715
 	tcphdr->hlen = ( ( sizeof ( *tcphdr ) / 4 ) << 4 );
716 716
 	tcphdr->flags = ( TCP_RST | TCP_ACK );
717
-	tcphdr->win = htons ( TCP_MAX_WINDOW_SIZE );
717
+	tcphdr->win = htons ( 0 );
718 718
 	tcphdr->csum = tcpip_chksum ( iobuf->data, iob_len ( iobuf ) );
719 719
 
720 720
 	/* Dump header */

Loading…
取消
儲存