Date: Wed, 23 Aug 2017 15:08:52 +0000 (UTC) From: Michael Tuexen <tuexen@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322813 - head/sys/netinet/tcp_stacks Message-ID: <201708231508.v7NF8qdK046463@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tuexen Date: Wed Aug 23 15:08:51 2017 New Revision: 322813 URL: https://svnweb.freebsd.org/changeset/base/322813 Log: Avoid TCP log messages which are false positives. This is https://svnweb.freebsd.org/changeset/base/322812, just for alternate TCP stacks. XMFC with: 322812 Modified: head/sys/netinet/tcp_stacks/fastpath.c Modified: head/sys/netinet/tcp_stacks/fastpath.c ============================================================================== --- head/sys/netinet/tcp_stacks/fastpath.c Wed Aug 23 14:50:08 2017 (r322812) +++ head/sys/netinet/tcp_stacks/fastpath.c Wed Aug 23 15:08:51 2017 (r322813) @@ -1831,24 +1831,6 @@ tcp_do_segment_fastslow(struct mbuf *m, struct tcphdr if (TSTMP_GT(to.to_tsecr, tcp_ts_getticks())) 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 @@ -1879,6 +1861,26 @@ tcp_do_segment_fastslow(struct mbuf *m, struct tcphdr (to.to_flags & TOF_SACKPERM) == 0) tp->t_flags &= ~TF_SACK_PERMIT; } + + /* + * 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); + } + } + can_enter = 0; if (__predict_true((tlen == 0))) { /* @@ -2306,24 +2308,6 @@ tcp_do_segment_fastack(struct mbuf *m, struct tcphdr * if (TSTMP_GT(to.to_tsecr, tcp_ts_getticks())) 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 @@ -2354,6 +2338,26 @@ tcp_do_segment_fastack(struct mbuf *m, struct tcphdr * (to.to_flags & TOF_SACKPERM) == 0) tp->t_flags &= ~TF_SACK_PERMIT; } + + /* + * 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201708231508.v7NF8qdK046463>