]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - net/dccp/input.c
Merge branch 'master' into csb1725
[mv-sheeva.git] / net / dccp / input.c
index 10c957a88f4f7c9c65da3cf2ba825686349c03f4..e424a09e83f61e6410607c01a2623ee5f8dea854 100644 (file)
@@ -239,7 +239,8 @@ static int dccp_check_seqno(struct sock *sk, struct sk_buff *skb)
                dccp_update_gsr(sk, seqno);
 
                if (dh->dccph_type != DCCP_PKT_SYNC &&
-                   (ackno != DCCP_PKT_WITHOUT_ACK_SEQ))
+                   ackno != DCCP_PKT_WITHOUT_ACK_SEQ &&
+                   after48(ackno, dp->dccps_gar))
                        dp->dccps_gar = ackno;
        } else {
                unsigned long now = jiffies;
@@ -259,7 +260,7 @@ static int dccp_check_seqno(struct sock *sk, struct sk_buff *skb)
                                      sysctl_dccp_sync_ratelimit)))
                        return 0;
 
-               DCCP_WARN("DCCP: Step 6 failed for %s packet, "
+               DCCP_WARN("Step 6 failed for %s packet, "
                          "(LSWL(%llu) <= P.seqno(%llu) <= S.SWH(%llu)) and "
                          "(P.ackno %s or LAWL(%llu) <= P.ackno(%llu) <= S.AWH(%llu), "
                          "sending SYNC...\n",  dccp_packet_name(dh->dccph_type),
@@ -441,20 +442,14 @@ static int dccp_rcv_request_sent_state_process(struct sock *sk,
                kfree_skb(sk->sk_send_head);
                sk->sk_send_head = NULL;
 
-               dp->dccps_isr = DCCP_SKB_CB(skb)->dccpd_seq;
-               dccp_update_gsr(sk, dp->dccps_isr);
                /*
-                * 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.
-                *
-                * AWL was adjusted in dccp_v4_connect -acme
+                * Set ISR, GSR from packet. ISS was set in dccp_v{4,6}_connect
+                * and GSS in dccp_transmit_skb(). Setting AWL/AWH and SWL/SWH
+                * is done as part of activating the feature values below, since
+                * these settings depend on the local/remote Sequence Window
+                * features, which were undefined or not confirmed until now.
                 */
-               dccp_set_seqno(&dp->dccps_swl,
-                              max48(dp->dccps_swl, dp->dccps_isr));
+               dp->dccps_gsr = dp->dccps_isr = DCCP_SKB_CB(skb)->dccpd_seq;
 
                dccp_sync_mss(sk, icsk->icsk_pmtu_cookie);