]> err.no Git - linux-2.6/commitdiff
[CCID2]: Bug in reading Ack Vectors
authorGerrit Renker <gerrit@erg.abdn.ac.uk>
Sat, 24 Nov 2007 22:37:48 +0000 (20:37 -0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 22:54:51 +0000 (14:54 -0800)
In CCID2 the receiver-history is sorted in ascending order of sequence number,
but the processing of received Ack Vectors requires the list traversal in the
opposite direction.

The current code has a bug in this regard: the list traversal is upwards. As a
consequence, only Ack Vectors with a run length of 1 will pass, in all other
Ack Vectors the remaining (acked) sequence numbers are missed, and may later
falsely be identified as lost.

Note: This bug is only visible when Ack Ratio > 1, since otherwise the run
      lengths of Ack Vectors are 0.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dccp/ccids/ccid2.c

index c9c465e86281e6119a550b8fa5bac82906380f45..7873dc78b6bc132c6097a76da6d038b2aa1a7816 100644 (file)
@@ -666,7 +666,7 @@ static void ccid2_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
                                        done = 1;
                                        break;
                                }
-                               seqp = seqp->ccid2s_next;
+                               seqp = seqp->ccid2s_prev;
                        }
                        if (done)
                                break;