summaryrefslogtreecommitdiffstats
path: root/src/net
diff options
context:
space:
mode:
authorMichael Brown2017-03-22 14:11:05 +0100
committerMichael Brown2017-03-22 14:11:05 +0100
commit75bb948008be207599fbb6534e282d45528f267b (patch)
treea110a3bd2135520511de38b0e46d6e44760e3f8e /src/net
parent[xen] Use standard calling pattern for asprintf() (diff)
downloadipxe-75bb948008be207599fbb6534e282d45528f267b.tar.gz
ipxe-75bb948008be207599fbb6534e282d45528f267b.tar.xz
ipxe-75bb948008be207599fbb6534e282d45528f267b.zip
[tcp] Use correct length for memset()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net')
-rw-r--r--src/net/tcp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net/tcp.c b/src/net/tcp.c
index 37a202ef..cb3b84ed 100644
--- a/src/net/tcp.c
+++ b/src/net/tcp.c
@@ -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 );
}