Re: 8.5. Pseudocode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Vladimir.

DCCP sequence number comparisons use circular comparsion modulo 48 bits (Section 3.1). This takes care of sequence number wrapping in the highlighted pseudocode.

Eddie


vladimir.moltchanov@xxxxxxxxx wrote:
Hello,

For study and testing purposes, I am implementing dccp under older version of linux 2.6.10 to run as a module. During basic testing of the protocol packet exchange I've noticed a small problem at input processing pseudocode. It doesn’t seem to take into account a case, when sequence numbers are wrapping back to 0,1,2.... I am wonderring, If I have missed something in the algorithm and it’s a bug in my implementation.



   Step 6: Check sequence numbers
      If P.X == 0 and the relevant Allow Short Seqnos feature is 0,
         /* Packet has short seqnos, but short seqnos not allowed */
         Drop packet and return
      Otherwise, if P.X == 0,
         Extend P.seqno and P.ackno to 48 bits using the procedure
         in Section 7.6
      Let LSWL = S.SWL and LAWL = S.AWL
      If P.type == CloseReq or P.type == Close or P.type == Reset,
         LSWL := S.GSR + 1, LAWL := S.GAR
******* If LSWL <= P.seqno <= S.SWH
            and (P.ackno does not exist or LAWL <= P.ackno <= S.AWH),
*******

         Update S.GSR, S.SWL, S.SWH
         If P.type != Sync,
            Update S.GAR
      Otherwise,
         If P.type == Reset,
            Send Sync packet acknowledging S.GSR
         Otherwise,
            Send Sync packet acknowledging P.seqno
         Drop packet and return


B.R.
Vladimir.




[Index of Archives]     [Linux Kernel Development]     [Linux DCCP]     [IETF Annouce]     [Linux Networking]     [Git]     [Security]     [Linux Assembly]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [DDR & Rambus]

  Powered by Linux