aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp
diff options
context:
space:
mode:
Diffstat (limited to 'net/dccp')
-rw-r--r--net/dccp/ccids/ccid2.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/dccp/ccids/ccid2.c b/net/dccp/ccids/ccid2.c
index 1dff4188f3f..426008e3b7e 100644
--- a/net/dccp/ccids/ccid2.c
+++ b/net/dccp/ccids/ccid2.c
@@ -59,7 +59,8 @@ static void ccid2_hc_tx_check_sanity(const struct ccid2_hc_tx_sock *hctx)
59 pipe++; 59 pipe++;
60 60
61 /* packets are sent sequentially */ 61 /* packets are sent sequentially */
62 BUG_ON(seqp->ccid2s_seq <= prev->ccid2s_seq); 62 BUG_ON(dccp_delta_seqno(seqp->ccid2s_seq,
63 prev->ccid2s_seq ) >= 0);
63 BUG_ON(time_before(seqp->ccid2s_sent, 64 BUG_ON(time_before(seqp->ccid2s_sent,
64 prev->ccid2s_sent)); 65 prev->ccid2s_sent));
65 66
@@ -562,8 +563,8 @@ static void ccid2_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
562 hctx->ccid2hctx_rpseq = seqno; 563 hctx->ccid2hctx_rpseq = seqno;
563 } else { 564 } else {
564 /* check if packet is consecutive */ 565 /* check if packet is consecutive */
565 if ((hctx->ccid2hctx_rpseq + 1) == seqno) 566 if (dccp_delta_seqno(hctx->ccid2hctx_rpseq, seqno) == 1)
566 hctx->ccid2hctx_rpseq++; 567 hctx->ccid2hctx_rpseq = seqno;
567 /* it's a later packet */ 568 /* it's a later packet */
568 else if (after48(seqno, hctx->ccid2hctx_rpseq)) { 569 else if (after48(seqno, hctx->ccid2hctx_rpseq)) {
569 hctx->ccid2hctx_rpdupack++; 570 hctx->ccid2hctx_rpdupack++;