david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

[tcp] Use correct length for memset()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown 2017-03-22 15:11:05 +02:00
parent 01496a5028
commit 75bb948008
1 changed files with 1 additions and 1 deletions

View File

@ -697,7 +697,7 @@ static void tcp_xmit_sack ( struct tcp_connection *tcp, uint32_t sack_seq ) {
wsopt->wsopt.length = sizeof ( wsopt->wsopt );
wsopt->wsopt.scale = TCP_RX_WINDOW_SCALE;
spopt = iob_push ( iobuf, sizeof ( *spopt ) );
memset ( spopt->nop, TCP_OPTION_NOP, sizeof ( spopt ) );
memset ( spopt->nop, TCP_OPTION_NOP, sizeof ( spopt->nop ) );
spopt->spopt.kind = TCP_OPTION_SACK_PERMITTED;
spopt->spopt.length = sizeof ( spopt->spopt );
}