diff options
author | Michael Tuexen <tuexen@FreeBSD.org> | 2017-08-23 14:50:08 +0000 |
---|---|---|
committer | Michael Tuexen <tuexen@FreeBSD.org> | 2017-08-23 14:50:08 +0000 |
commit | 4da9052a051aedac57a471bd0461cad792c6cac4 (patch) | |
tree | 4e4d7d69789870e6b235f09f685dce3342971a8f /sys/netinet/tcp_input.c | |
parent | 6323f724ea78463ace768298e66b7ed45205cab3 (diff) | |
download | src-4da9052a051aedac57a471bd0461cad792c6cac4.tar.gz src-4da9052a051aedac57a471bd0461cad792c6cac4.zip |
Notes
Diffstat (limited to 'sys/netinet/tcp_input.c')
-rw-r--r-- | sys/netinet/tcp_input.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index b1c968e83f97..28b9b0de7cc5 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1694,25 +1694,6 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, to.to_tsecr = 0; } /* - * If timestamps were negotiated during SYN/ACK they should - * appear on every segment during this session and vice versa. - */ - if ((tp->t_flags & TF_RCVD_TSTMP) && !(to.to_flags & TOF_TS)) { - if ((s = tcp_log_addrs(inc, th, NULL, NULL))) { - log(LOG_DEBUG, "%s; %s: Timestamp missing, " - "no action\n", s, __func__); - free(s, M_TCPLOG); - } - } - if (!(tp->t_flags & TF_RCVD_TSTMP) && (to.to_flags & TOF_TS)) { - if ((s = tcp_log_addrs(inc, th, NULL, NULL))) { - log(LOG_DEBUG, "%s; %s: Timestamp not expected, " - "no action\n", s, __func__); - free(s, M_TCPLOG); - } - } - - /* * Process options only when we get SYN/ACK back. The SYN case * for incoming connections is handled in tcp_syncache. * According to RFC1323 the window field in a SYN (i.e., a <SYN> @@ -1743,6 +1724,25 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, } /* + * If timestamps were negotiated during SYN/ACK they should + * appear on every segment during this session and vice versa. + */ + if ((tp->t_flags & TF_RCVD_TSTMP) && !(to.to_flags & TOF_TS)) { + if ((s = tcp_log_addrs(inc, th, NULL, NULL))) { + log(LOG_DEBUG, "%s; %s: Timestamp missing, " + "no action\n", s, __func__); + free(s, M_TCPLOG); + } + } + if (!(tp->t_flags & TF_RCVD_TSTMP) && (to.to_flags & TOF_TS)) { + if ((s = tcp_log_addrs(inc, th, NULL, NULL))) { + log(LOG_DEBUG, "%s; %s: Timestamp not expected, " + "no action\n", s, __func__); + free(s, M_TCPLOG); + } + } + + /* * Header prediction: check for the two common cases * of a uni-directional data xfer. If the packet has * no control flags, is in-sequence, the window didn't |