diff options
| author | Andre Oppermann <andre@FreeBSD.org> | 2007-05-11 18:29:39 +0000 |
|---|---|---|
| committer | Andre Oppermann <andre@FreeBSD.org> | 2007-05-11 18:29:39 +0000 |
| commit | 504abdc6e664076a16c1ea8c25e9ee1a6e224695 (patch) | |
| tree | 55cfdb7012b4c1d1d992d7ea3ad5648bfe2656d6 /sys/netinet/tcp_subr.c | |
| parent | c6cf3e202a37061660a7547651f3119706686f22 (diff) | |
Notes
Diffstat (limited to 'sys/netinet/tcp_subr.c')
| -rw-r--r-- | sys/netinet/tcp_subr.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index a3bdb08817a4..aa2b86dcdf1c 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -1781,10 +1781,13 @@ tcp_twstart(struct tcpcb *tp) * Set t_recent if timestamps are used on the connection. */ if ((tp->t_flags & (TF_REQ_TSTMP|TF_RCVD_TSTMP|TF_NOOPT)) == - (TF_REQ_TSTMP|TF_RCVD_TSTMP)) + (TF_REQ_TSTMP|TF_RCVD_TSTMP)) { tw->t_recent = tp->ts_recent; - else + tw->ts_offset = tp->ts_offset; + } else { tw->t_recent = 0; + tw->ts_offset = 0; + } tw->snd_nxt = tp->snd_nxt; tw->rcv_nxt = tp->rcv_nxt; @@ -1986,7 +1989,7 @@ tcp_twrespond(struct tcptw *tw, int flags) */ if (tw->t_recent && flags == TH_ACK) { to.to_flags |= TOF_TS; - to.to_tsval = ticks; + to.to_tsval = ticks + tw->ts_offset; to.to_tsecr = tw->t_recent; } optlen = tcp_addoptions(&to, (u_char *)(th + 1)); |
