Page MenuHomeFreeBSD

D28143.diff
No OneTemporary

D28143.diff

diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -1692,16 +1692,25 @@
/*
* If timestamps were negotiated during SYN/ACK and a
* segment without a timestamp is received, silently drop
- * the segment.
+ * the segment, unless it is a RST segment.
* See section 3.2 of RFC 7323.
*/
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, "
- "segment silently dropped\n", s, __func__);
- free(s, M_TCPLOG);
+ if ((thflags & TH_RST) != 0) {
+ if ((s = tcp_log_addrs(inc, th, NULL, NULL))) {
+ log(LOG_DEBUG, "%s; %s: Timestamp missing, "
+ "segment processed normally\n",
+ s, __func__);
+ free(s, M_TCPLOG);
+ }
+ } else {
+ if ((s = tcp_log_addrs(inc, th, NULL, NULL))) {
+ log(LOG_DEBUG, "%s; %s: Timestamp missing, "
+ "segment silently dropped\n", s, __func__);
+ free(s, M_TCPLOG);
+ }
+ goto drop;
}
- goto drop;
}
/*
* If timestamps were not negotiated during SYN/ACK and a
diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c
--- a/sys/netinet/tcp_stacks/bbr.c
+++ b/sys/netinet/tcp_stacks/bbr.c
@@ -11463,10 +11463,11 @@
/*
* If timestamps were negotiated during SYN/ACK and a
* segment without a timestamp is received, silently drop
- * the segment.
+ * the segment, unless it is a RST segment.
* See section 3.2 of RFC 7323.
*/
- if ((tp->t_flags & TF_RCVD_TSTMP) && !(to.to_flags & TOF_TS)) {
+ if ((tp->t_flags & TF_RCVD_TSTMP) && !(to.to_flags & TOF_TS) &&
+ ((thflags & TH_RST) == 0)) {
retval = 0;
goto done_with_input;
}
diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c
--- a/sys/netinet/tcp_stacks/rack.c
+++ b/sys/netinet/tcp_stacks/rack.c
@@ -10879,10 +10879,11 @@
/*
* If timestamps were negotiated during SYN/ACK and a
* segment without a timestamp is received, silently drop
- * the segment.
+ * the segment, unless it is a RST segment.
* See section 3.2 of RFC 7323.
*/
- if ((tp->t_flags & TF_RCVD_TSTMP) && !(to.to_flags & TOF_TS)) {
+ if ((tp->t_flags & TF_RCVD_TSTMP) && !(to.to_flags & TOF_TS) &&
+ ((thflags & TH_RST) == 0)) {
way_out = 5;
retval = 0;
goto done_with_input;

File Metadata

Mime Type
text/plain
Expires
Tue, Oct 1, 1:11 PM (18 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
13252356
Default Alt Text
D28143.diff (2 KB)

Event Timeline