Page MenuHomeFreeBSD

D23371.id67323.diff
No OneTemporary

D23371.id67323.diff

Index: sys/netinet/tcp_input.c
===================================================================
--- sys/netinet/tcp_input.c
+++ sys/netinet/tcp_input.c
@@ -1613,21 +1613,24 @@
(tp->t_flags & TF_REQ_SCALE)) {
tp->t_flags |= TF_RCVD_SCALE;
tp->snd_scale = to.to_wscale;
- }
+ } else
+ tp->t_flags &= ~TF_REQ_SCALE;
/*
* Initial send window. It will be updated with
* the next incoming segment to the scaled value.
*/
tp->snd_wnd = th->th_win;
- if (to.to_flags & TOF_TS) {
+ if ((to.to_flags & TOF_TS) &&
+ (tp->t_flags & TF_REQ_TSTMP)) {
tp->t_flags |= TF_RCVD_TSTMP;
tp->ts_recent = to.to_tsval;
tp->ts_recent_age = tcp_ts_getticks();
- }
+ } else
+ tp->t_flags &= ~TF_REQ_TSTMP;
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)
+ if (!(to.to_flags & TOF_SACKPERM) &&
+ (tp->t_flags & TF_SACK_PERMIT))
tp->t_flags &= ~TF_SACK_PERMIT;
if (IS_FASTOPEN(tp->t_flags)) {
if (to.to_flags & TOF_FASTOPEN) {
Index: sys/netinet/tcp_stacks/rack.c
===================================================================
--- sys/netinet/tcp_stacks/rack.c
+++ sys/netinet/tcp_stacks/rack.c
@@ -7770,21 +7770,24 @@
(tp->t_flags & TF_REQ_SCALE)) {
tp->t_flags |= TF_RCVD_SCALE;
tp->snd_scale = to.to_wscale;
- }
+ } else
+ tp->t_flags &= ~TF_REQ_SCALE;
/*
* Initial send window. It will be updated with the
* next incoming segment to the scaled value.
*/
tp->snd_wnd = th->th_win;
- if (to.to_flags & TOF_TS) {
+ if ((to.to_flags & TOF_TS) &&
+ (tp->t_flags & TF_REQ_TSTMP)) {
tp->t_flags |= TF_RCVD_TSTMP;
tp->ts_recent = to.to_tsval;
tp->ts_recent_age = cts;
- }
+ } else
+ tp->t_flags &= ~TF_REQ_TSTMP;
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)
+ if (!(to.to_flags & TOF_SACKPERM) &&
+ (tp->t_flags & TF_SACK_PERMIT))
tp->t_flags &= ~TF_SACK_PERMIT;
if (IS_FASTOPEN(tp->t_flags)) {
if (to.to_flags & TOF_FASTOPEN) {

File Metadata

Mime Type
text/plain
Expires
Fri, Apr 17, 8:44 AM (6 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31650098
Default Alt Text
D23371.id67323.diff (2 KB)

Event Timeline