diff options
author | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2005-08-21 04:36:45 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-08-29 19:03:42 -0400 |
commit | 03ace394ac9bcad38043a381ae5f4860b9c9fa1c (patch) | |
tree | bbe5f7fc56074224ded47113974dbc3db550b303 /net/dccp/minisocks.c | |
parent | a3054d48b9b9d6290eccc9fc09c286ef450d9b1d (diff) |
[DCCP]: Fix the ACK and SEQ window variables settings
This is from a first audit, more eyeballs are more than welcome.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/minisocks.c')
-rw-r--r-- | net/dccp/minisocks.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/net/dccp/minisocks.c b/net/dccp/minisocks.c index b8e67207e97e..ce5dff4ac22e 100644 --- a/net/dccp/minisocks.c +++ b/net/dccp/minisocks.c | |||
@@ -146,6 +146,19 @@ out_free: | |||
146 | newdp->dccps_iss = dreq->dreq_iss; | 146 | newdp->dccps_iss = dreq->dreq_iss; |
147 | dccp_update_gss(newsk, dreq->dreq_iss); | 147 | dccp_update_gss(newsk, dreq->dreq_iss); |
148 | 148 | ||
149 | /* | ||
150 | * SWL and AWL are initially adjusted so that they are not less than | ||
151 | * the initial Sequence Numbers received and sent, respectively: | ||
152 | * SWL := max(GSR + 1 - floor(W/4), ISR), | ||
153 | * AWL := max(GSS - W' + 1, ISS). | ||
154 | * These adjustments MUST be applied only at the beginning of the | ||
155 | * connection. | ||
156 | */ | ||
157 | dccp_set_seqno(&newdp->dccps_swl, | ||
158 | max48(newdp->dccps_swl, newdp->dccps_isr)); | ||
159 | dccp_set_seqno(&newdp->dccps_awl, | ||
160 | max48(newdp->dccps_awl, newdp->dccps_iss)); | ||
161 | |||
149 | dccp_init_xmit_timers(newsk); | 162 | dccp_init_xmit_timers(newsk); |
150 | 163 | ||
151 | DCCP_INC_STATS_BH(DCCP_MIB_PASSIVEOPENS); | 164 | DCCP_INC_STATS_BH(DCCP_MIB_PASSIVEOPENS); |