• G
    [CCID2]: Sequence number wraparound issues · 5e28599a
    Gerrit Renker 提交于
    This replaces several uses of standard arithmetic with the DCCP
    sequence number arithmetic functions. The problem here is that the
    sequence number wrap-around was not taken into consideration.
    
     * Condition "seqp->ccid2s_seq <= prev->ccid2s_seq" has been replaced
       by
    
       	dccp_delta_seqno(seqp->ccid2s_seq, prev->ccid2s_seq) >= 0
    
       since if seqp is `before' prev, then the delta_seqno() is positive.
    
     * The test whether sequence numbers `a' and `b' are consecutive has
       the form
    
       	dccp_delta_seqno(a, b) == 1
    
     * Increment of ccid2hctx_rpseq could be done using dccp_inc_seqno(),
       but since here the incremented ccid2hctx_rpseq == seqno, used
       assignment instead.
    Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
    Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    5e28599a
ccid2.c 21.4 KB