Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cfbbeabc8864902c4af1c0cadf0972b352930a26
Commit:     cfbbeabc8864902c4af1c0cadf0972b352930a26
Parent:     3de5489f47febe0333b142e0eb6389b9924b2634
Author:     Gerrit Renker <[EMAIL PROTECTED]>
AuthorDate: Sat Nov 24 20:43:59 2007 -0200
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Jan 28 14:54:52 2008 -0800

    [CCID2]: Fix sequence number arithmetic/comparisons
    
    This replaces use of normal subtraction with modulo-48 subtraction.
    
    Signed-off-by: Gerrit Renker <[EMAIL PROTECTED]>
    Acked-by: Ian McDonald <[EMAIL PROTECTED]>
    Signed-off-by: Arnaldo Carvalho de Melo <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/dccp/ccids/ccid2.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/net/dccp/ccids/ccid2.c b/net/dccp/ccids/ccid2.c
index 7873dc7..5552218 100644
--- a/net/dccp/ccids/ccid2.c
+++ b/net/dccp/ccids/ccid2.c
@@ -24,9 +24,6 @@
 
 /*
  * This implementation should follow RFC 4341
- *
- * BUGS:
- * - sequence number wrapping
  */
 
 #include "../ccid.h"
@@ -619,9 +616,8 @@ static void ccid2_hc_tx_packet_recv(struct sock *sk, struct 
sk_buff *skb)
                /* go through this ack vector */
                while (veclen--) {
                        const u8 rl = *vector & DCCP_ACKVEC_LEN_MASK;
-                       u64 ackno_end_rl;
+                       u64 ackno_end_rl = SUB48(ackno, rl);
 
-                       dccp_set_seqno(&ackno_end_rl, ackno - rl);
                        ccid2_pr_debug("ackvec start:%llu end:%llu\n",
                                       (unsigned long long)ackno,
                                       (unsigned long long)ackno_end_rl);
@@ -671,8 +667,7 @@ static void ccid2_hc_tx_packet_recv(struct sock *sk, struct 
sk_buff *skb)
                        if (done)
                                break;
 
-
-                       dccp_set_seqno(&ackno, ackno_end_rl - 1);
+                       ackno = SUB48(ackno_end_rl, 1);
                        vector++;
                }
                if (done)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to