Parcourir la source

[tcp] Use a zero window size for RST packets

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown il y a 12 ans
Parent
révision
49ac629821
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1
    1
      src/net/tcp.c

+ 1
- 1
src/net/tcp.c Voir le fichier

@@ -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 */

Chargement…
Annuler
Enregistrer