From 8733f6676ac542282cb6a8bb1aee03e471bc0603 Mon Sep 17 00:00:00 2001 From: claudio Date: Wed, 29 Sep 2010 19:42:11 +0000 Subject: Initialize the ts_recent (received timestamp) field in the newly created socket from the information we have in the syncache. Also bzero() the tcpcb that is passed to tcp_dooptions() just to be sure. --- sys/netinet/tcp_input.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/netinet/tcp_input.c') diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 61bf7e8f230..66ad114f222 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_input.c,v 1.238 2010/09/29 18:00:19 claudio Exp $ */ +/* $OpenBSD: tcp_input.c,v 1.239 2010/09/29 19:42:11 claudio Exp $ */ /* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */ /* @@ -3812,6 +3812,7 @@ syn_cache_get(struct sockaddr *src, struct sockaddr *dst, struct tcphdr *th, #endif tp->ts_modulate = sc->sc_modulate; + tp->ts_recent = sc->sc_timestamp; tp->iss = sc->sc_iss; tp->irs = sc->sc_irs; tcp_sendseqinit(tp); @@ -3992,6 +3993,7 @@ syn_cache_add(struct sockaddr *src, struct sockaddr *dst, struct tcphdr *th, #else if (optp) { #endif + bzero(&tb, sizeof(tb)); tb.pf = tp->pf; #ifdef TCP_SACK tb.sack_enable = tp->sack_enable; -- cgit v1.2.3-59-g8ed1b