diff options
Diffstat (limited to 'net/dccp/minisocks.c')
-rw-r--r-- | net/dccp/minisocks.c | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/net/dccp/minisocks.c b/net/dccp/minisocks.c index 128b089d3aef..d7041a0963af 100644 --- a/net/dccp/minisocks.c +++ b/net/dccp/minisocks.c | |||
@@ -121,30 +121,18 @@ struct sock *dccp_create_openreq_child(struct sock *sk, | |||
121 | * | 121 | * |
122 | * Choose S.ISS (initial seqno) or set from Init Cookies | 122 | * Choose S.ISS (initial seqno) or set from Init Cookies |
123 | * Initialize S.GAR := S.ISS | 123 | * Initialize S.GAR := S.ISS |
124 | * Set S.ISR, S.GSR, S.SWL, S.SWH from packet or Init Cookies | 124 | * Set S.ISR, S.GSR from packet (or Init Cookies) |
125 | */ | 125 | * |
126 | newdp->dccps_gar = newdp->dccps_iss = dreq->dreq_iss; | 126 | * Setting AWL/AWH and SWL/SWH happens as part of the feature |
127 | dccp_update_gss(newsk, dreq->dreq_iss); | 127 | * activation below, as these windows all depend on the local |
128 | 128 | * and remote Sequence Window feature values (7.5.2). | |
129 | newdp->dccps_isr = dreq->dreq_isr; | ||
130 | dccp_update_gsr(newsk, dreq->dreq_isr); | ||
131 | |||
132 | /* | ||
133 | * SWL and AWL are initially adjusted so that they are not less than | ||
134 | * the initial Sequence Numbers received and sent, respectively: | ||
135 | * SWL := max(GSR + 1 - floor(W/4), ISR), | ||
136 | * AWL := max(GSS - W' + 1, ISS). | ||
137 | * These adjustments MUST be applied only at the beginning of the | ||
138 | * connection. | ||
139 | */ | 129 | */ |
140 | dccp_set_seqno(&newdp->dccps_swl, | 130 | newdp->dccps_gss = newdp->dccps_iss = dreq->dreq_iss; |
141 | max48(newdp->dccps_swl, newdp->dccps_isr)); | 131 | newdp->dccps_gar = newdp->dccps_iss; |
142 | dccp_set_seqno(&newdp->dccps_awl, | 132 | newdp->dccps_gsr = newdp->dccps_isr = dreq->dreq_isr; |
143 | max48(newdp->dccps_awl, newdp->dccps_iss)); | ||
144 | 133 | ||
145 | /* | 134 | /* |
146 | * Activate features after initialising the sequence numbers, | 135 | * Activate features: initialise CCIDs, sequence windows etc. |
147 | * since CCID initialisation may depend on GSS, ISR, ISS etc. | ||
148 | */ | 136 | */ |
149 | if (dccp_feat_activate_values(newsk, &dreq->dreq_featneg)) { | 137 | if (dccp_feat_activate_values(newsk, &dreq->dreq_featneg)) { |
150 | /* It is still raw copy of parent, so invalidate | 138 | /* It is still raw copy of parent, so invalidate |