diff options
| author | Gerrit Renker <[email protected]> | 2007-11-24 22:43:59 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2008-01-28 22:54:52 +0000 |
| commit | cfbbeabc8864902c4af1c0cadf0972b352930a26 (patch) | |
| tree | 90b544b5ad57bd49c25715a595ccd23d227dd714 /net/dccp/ccids/ccid2.c | |
| parent | [CCID2]: Bug in reading Ack Vectors (diff) | |
| download | kernel-cfbbeabc8864902c4af1c0cadf0972b352930a26.tar.gz kernel-cfbbeabc8864902c4af1c0cadf0972b352930a26.zip | |
[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]>
Diffstat (limited to 'net/dccp/ccids/ccid2.c')
| -rw-r--r-- | 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 7873dc78b6bc..55522182f2fa 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) |
