A TCP server has to take into consideration, if TCP_NOOPT is preventing
the negotiation of TCP features. This affects most TCP options but adherance to RFC7323 with the timestamp option will prevent a session from getting established. PR: 253576 Reviewed By: tuexen, #transport MFC after: 3 days Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D28652
This commit is contained in:
parent
31d7a27c6e
commit
2593f858d7
@ -1644,7 +1644,8 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
|
||||
TCPSTAT_INC(tcps_ecn_shs);
|
||||
}
|
||||
if ((to.to_flags & TOF_SCALE) &&
|
||||
(tp->t_flags & TF_REQ_SCALE)) {
|
||||
(tp->t_flags & TF_REQ_SCALE) &&
|
||||
!(tp->t_flags & TF_NOOPT)) {
|
||||
tp->t_flags |= TF_RCVD_SCALE;
|
||||
tp->snd_scale = to.to_wscale;
|
||||
} else
|
||||
@ -1655,7 +1656,8 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
|
||||
*/
|
||||
tp->snd_wnd = th->th_win;
|
||||
if ((to.to_flags & TOF_TS) &&
|
||||
(tp->t_flags & TF_REQ_TSTMP)) {
|
||||
(tp->t_flags & TF_REQ_TSTMP) &&
|
||||
!(tp->t_flags & TF_NOOPT)) {
|
||||
tp->t_flags |= TF_RCVD_TSTMP;
|
||||
tp->ts_recent = to.to_tsval;
|
||||
tp->ts_recent_age = tcp_ts_getticks();
|
||||
@ -1664,10 +1666,12 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
|
||||
if (to.to_flags & TOF_MSS)
|
||||
tcp_mss(tp, to.to_mss);
|
||||
if ((tp->t_flags & TF_SACK_PERMIT) &&
|
||||
(to.to_flags & TOF_SACKPERM) == 0)
|
||||
(!(to.to_flags & TOF_SACKPERM) ||
|
||||
(tp->t_flags & TF_NOOPT)))
|
||||
tp->t_flags &= ~TF_SACK_PERMIT;
|
||||
if (IS_FASTOPEN(tp->t_flags)) {
|
||||
if (to.to_flags & TOF_FASTOPEN) {
|
||||
if ((to.to_flags & TOF_FASTOPEN) &&
|
||||
!(tp->t_flags & TF_NOOPT)) {
|
||||
uint16_t mss;
|
||||
|
||||
if (to.to_flags & TOF_MSS)
|
||||
|
@ -1655,7 +1655,8 @@ syncache_add(struct in_conninfo *inc, struct tcpopt *to, struct tcphdr *th,
|
||||
win = imin(win, TCP_MAXWIN);
|
||||
sc->sc_wnd = win;
|
||||
|
||||
if (V_tcp_do_rfc1323) {
|
||||
if (V_tcp_do_rfc1323 &&
|
||||
!(ltflags & TF_NOOPT)) {
|
||||
/*
|
||||
* A timestamp received in a SYN makes
|
||||
* it ok to send timestamp requests and replies.
|
||||
|
Loading…
Reference in New Issue
Block a user