tcp: honor rfc1323 sysctl on passive sessions

On passive sessions, honor the local settings disabling or
enabling window scaling and timestamp options.

Reviewed By:    	tuexen, #transport
Sponsored by:   	NetApp, Inc.
Differential Revision:	https://reviews.freebsd.org/D36874
This commit is contained in:
Richard Scheffenegger 2022-10-07 01:43:14 +02:00
parent 9c65583835
commit 265d0f767c
2 changed files with 3 additions and 3 deletions

View File

@ -34,7 +34,7 @@
.\" From: @(#)tcp.4 8.1 (Berkeley) 6/5/93 .\" From: @(#)tcp.4 8.1 (Berkeley) 6/5/93
.\" $FreeBSD$ .\" $FreeBSD$
.\" .\"
.Dd August 1, 2022 .Dd October 7, 2022
.Dt TCP 4 .Dt TCP 4
.Os .Os
.Sh NAME .Sh NAME

View File

@ -1679,12 +1679,12 @@ syncache_add(struct in_conninfo *inc, struct tcpopt *to, struct tcphdr *th,
* A timestamp received in a SYN makes * A timestamp received in a SYN makes
* it ok to send timestamp requests and replies. * it ok to send timestamp requests and replies.
*/ */
if (to->to_flags & TOF_TS) { if ((to->to_flags & TOF_TS) && (V_tcp_do_rfc1323 != 2)) {
sc->sc_tsreflect = to->to_tsval; sc->sc_tsreflect = to->to_tsval;
sc->sc_flags |= SCF_TIMESTAMP; sc->sc_flags |= SCF_TIMESTAMP;
sc->sc_tsoff = tcp_new_ts_offset(inc); sc->sc_tsoff = tcp_new_ts_offset(inc);
} }
if (to->to_flags & TOF_SCALE) { if ((to->to_flags & TOF_SCALE) && (V_tcp_do_rfc1323 != 3)) {
int wscale = 0; int wscale = 0;
/* /*