]> err.no Git - linux-2.6/blobdiff - net/dccp/ipv4.c
[PATCH] jffs/jffs2: remove wrong function prototypes
[linux-2.6] / net / dccp / ipv4.c
index 02ebf1f39f384d629518462e68971c35bc0b9eda..3fc75dbee4b8e4d068a0b4598fc96900c5a90842 100644 (file)
@@ -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);
@@ -1270,6 +1280,7 @@ static int dccp_v4_init_sock(struct sock *sk)
        dccp_init_xmit_timers(sk);
        inet_csk(sk)->icsk_rto = DCCP_TIMEOUT_INIT;
        sk->sk_state = DCCP_CLOSED;
+       sk->sk_write_space = dccp_write_space;
        dp->dccps_mss_cache = 536;
        dp->dccps_role = DCCP_ROLE_UNDEFINED;
 
@@ -1293,6 +1304,8 @@ static int dccp_v4_destroy_sock(struct sock *sk)
        if (inet_csk(sk)->icsk_bind_hash != NULL)
                inet_put_port(&dccp_hashinfo, sk);
 
+       ccid_hc_rx_exit(dp->dccps_hc_rx_ccid, sk);
+       ccid_hc_tx_exit(dp->dccps_hc_tx_ccid, sk);
        dccp_ackpkts_free(dp->dccps_hc_rx_ackpkts);
        dp->dccps_hc_rx_ackpkts = NULL;
        ccid_exit(dp->dccps_hc_rx_ccid, sk);