From 0a5df51410ade938293ea338d950f8145bead68c Mon Sep 17 00:00:00 2001 From: Andre Oppermann Date: Fri, 20 Apr 2007 13:36:48 +0000 Subject: [PATCH] Only update TCP timestamp on SYN duplication if it is present on current SYN in syncache_add(). Otherwise disable timestamps. --- sys/netinet/tcp_syncache.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index 87b73d68dc56..939a49cece11 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -930,8 +930,10 @@ syncache_add(struct in_conninfo *inc, struct tcpopt *to, struct tcphdr *th, /* * Update timestamp if present. */ - if (sc->sc_flags & SCF_TIMESTAMP) + if ((sc->sc_flags & SCF_TIMESTAMP) && (to->to_flags & TOF_TS)) sc->sc_tsreflect = to->to_tsval; + else + sc->sc_flags &= ~SCF_TIMESTAMP; #ifdef MAC /* * Since we have already unconditionally allocated label