Index: sys/netinet/tcp_input.c =================================================================== --- sys/netinet/tcp_input.c +++ sys/netinet/tcp_input.c @@ -1649,7 +1649,8 @@ 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 @@ -1660,7 +1661,8 @@ */ 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(); @@ -1669,9 +1671,11 @@ 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 (IS_FASTOPEN(tp->t_flags) && + !(tp->t_flags & TF_NOOPT)) { if (to.to_flags & TOF_FASTOPEN) { uint16_t mss; Index: sys/netinet/tcp_subr.c =================================================================== --- sys/netinet/tcp_subr.c +++ sys/netinet/tcp_subr.c @@ -1763,10 +1763,12 @@ callout_init(&tp->t_timers->tt_2msl, 1); callout_init(&tp->t_timers->tt_delack, 1); - if (V_tcp_do_rfc1323) - tp->t_flags = (TF_REQ_SCALE|TF_REQ_TSTMP); - if (V_tcp_do_sack) - tp->t_flags |= TF_SACK_PERMIT; + if !(tp->t_flags & TF_NOOPT) { + if (V_tcp_do_rfc1323) + tp->t_flags = (TF_REQ_SCALE|TF_REQ_TSTMP); + if (V_tcp_do_sack) + tp->t_flags |= TF_SACK_PERMIT; + } TAILQ_INIT(&tp->snd_holes); /* Index: sys/netinet/tcp_syncache.c =================================================================== --- sys/netinet/tcp_syncache.c +++ sys/netinet/tcp_syncache.c @@ -1655,7 +1655,8 @@ 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.