diff options
author | andre <andre@FreeBSD.org> | 2007-04-20 13:36:48 +0000 |
---|---|---|
committer | andre <andre@FreeBSD.org> | 2007-04-20 13:36:48 +0000 |
commit | e7ec21637e6dd18c3e21ba5798215a8f0754ff00 (patch) | |
tree | d5b8fd694884b2a73b78ef9b1c0772feae1e0ad5 /sys/netinet/tcp_syncache.c | |
parent | fa8779e96a9e5001ef9bc85276fcb920b91c0fda (diff) | |
download | FreeBSD-src-e7ec21637e6dd18c3e21ba5798215a8f0754ff00.zip FreeBSD-src-e7ec21637e6dd18c3e21ba5798215a8f0754ff00.tar.gz |
Only update TCP timestamp on SYN duplication if it is present on
current SYN in syncache_add(). Otherwise disable timestamps.
Diffstat (limited to 'sys/netinet/tcp_syncache.c')
-rw-r--r-- | sys/netinet/tcp_syncache.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index 87b73d6..939a49c 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 |