Only update TCP timestamp on SYN duplication if it is present on

current SYN in syncache_add().  Otherwise disable timestamps.
This commit is contained in:
Andre Oppermann 2007-04-20 13:36:48 +00:00
parent c73f70b728
commit 0a5df51410
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=168901

View File

@ -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