X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=net%2Fdccp%2Fminisocks.c;h=ce5dff4ac22ea9435a15b20a9da054487879aefe;hb=a57ebc90f1350296edded12d33d7c278831bc3bf;hp=b8e67207e97e15995b6a1dcaa538c39ea23bdf14;hpb=7690af3fff7633e40b1b9950eb8489129251d074;p=linux-2.6 diff --git a/net/dccp/minisocks.c b/net/dccp/minisocks.c index b8e67207e9..ce5dff4ac2 100644 --- a/net/dccp/minisocks.c +++ b/net/dccp/minisocks.c @@ -146,6 +146,19 @@ out_free: newdp->dccps_iss = dreq->dreq_iss; dccp_update_gss(newsk, dreq->dreq_iss); + /* + * SWL and AWL are initially adjusted so that they are not less than + * the initial Sequence Numbers received and sent, respectively: + * SWL := max(GSR + 1 - floor(W/4), ISR), + * AWL := max(GSS - W' + 1, ISS). + * These adjustments MUST be applied only at the beginning of the + * connection. + */ + dccp_set_seqno(&newdp->dccps_swl, + max48(newdp->dccps_swl, newdp->dccps_isr)); + dccp_set_seqno(&newdp->dccps_awl, + max48(newdp->dccps_awl, newdp->dccps_iss)); + dccp_init_xmit_timers(newsk); DCCP_INC_STATS_BH(DCCP_MIB_PASSIVEOPENS);