diff options
author | Michael Tuexen <tuexen@FreeBSD.org> | 2021-01-13 21:48:17 +0000 |
---|---|---|
committer | Michael Tuexen <tuexen@FreeBSD.org> | 2021-01-14 18:28:25 +0000 |
commit | d2b3ceddccac60b563f642898e3a314647666a10 (patch) | |
tree | c364fb4d552610a239467e2710ccd9c85abb6b0d /sys/netinet/tcp_stacks/rack.c | |
parent | 54c743e5b29163cb0ee8504b8fb947db5c38497c (diff) | |
download | src-d2b3ceddccac60b563f642898e3a314647666a10.tar.gz src-d2b3ceddccac60b563f642898e3a314647666a10.zip |
tcp: add sysctl to tolerate TCP segments missing timestamps
When timestamp support has been negotiated, TCP segements received
without a timestamp should be discarded. However, there are broken
TCP implementations (for example, stacks used by Omniswitch 63xx and
64xx models), which send TCP segments without timestamps although
they negotiated timestamp support.
This patch adds a sysctl variable which tolerates such TCP segments
and allows to interoperate with broken stacks.
Reviewed by: jtl@, rscheff@
Differential Revision: https://reviews.freebsd.org/D28142
Sponsored by: Netflix, Inc.
PR: 252449
MFC after: 1 week
Diffstat (limited to 'sys/netinet/tcp_stacks/rack.c')
-rw-r--r-- | sys/netinet/tcp_stacks/rack.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index 7c81e8b3a2bc..8e00cae85496 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -10879,11 +10879,12 @@ rack_do_segment_nounlock(struct mbuf *m, struct tcphdr *th, struct socket *so, /* * If timestamps were negotiated during SYN/ACK and a * segment without a timestamp is received, silently drop - * the segment, unless it is a RST segment. + * the segment, unless it is a RST segment or missing timestamps are + * tolerated. * See section 3.2 of RFC 7323. */ if ((tp->t_flags & TF_RCVD_TSTMP) && !(to.to_flags & TOF_TS) && - ((thflags & TH_RST) == 0)) { + ((thflags & TH_RST) == 0) && (V_tcp_tolerate_missing_ts == 0)) { way_out = 5; retval = 0; goto done_with_input; |