summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2010-09-29 19:42:12 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2010-09-29 19:42:12 +0000
commita661fbd96e93c647ee981cfc9c3a54617012c2fa (patch)
tree4c369df791cb3b2ab5c81702a142fa1368daaeac /sys
parent5df3d9165c8ebce4fb85f484006a9d0e43055283 (diff)
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.
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/tcp_input.c4
1 files changed, 3 insertions, 1 deletions
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;