summaryrefslogtreecommitdiffstats
path: root/net/dccp/ipv4.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2005-08-21 05:36:45 -0300
committerDavid S. Miller <davem@sunset.davemloft.net>2005-08-29 16:03:42 -0700
commit03ace394ac9bcad38043a381ae5f4860b9c9fa1c (patch)
treebbe5f7fc56074224ded47113974dbc3db550b303 /net/dccp/ipv4.c
parenta3054d48b9b9d6290eccc9fc09c286ef450d9b1d (diff)
downloadblackbird-op-linux-03ace394ac9bcad38043a381ae5f4860b9c9fa1c.tar.gz
blackbird-op-linux-03ace394ac9bcad38043a381ae5f4860b9c9fa1c.zip
[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/ipv4.c')
-rw-r--r--net/dccp/ipv4.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index 02ebf1f39f38..647e669a1266 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -309,6 +309,16 @@ static int dccp_v4_connect(struct sock *sk, struct sockaddr *uaddr,
usin->sin_port);
dccp_update_gss(sk, dp->dccps_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(&dp->dccps_awl, max48(dp->dccps_awl, dp->dccps_iss));
+
inet->id = dp->dccps_iss ^ jiffies;
err = dccp_connect(sk);
OpenPOWER on IntegriCloud