]> err.no Git - linux-2.6/commit
dccp ccid-3: Fix error in loss detection
authorGerrit Renker <gerrit@erg.abdn.ac.uk>
Sun, 13 Jul 2008 10:51:40 +0000 (11:51 +0100)
committerGerrit Renker <gerrit@erg.abdn.ac.uk>
Sun, 13 Jul 2008 10:51:40 +0000 (11:51 +0100)
commit2013c7e35aeba39777f9b3eef8a70207b3931152
tree5d63ce9f8c512ffd17b8084002e6dc0e0f998b84
parent79d16385c7f287a33ea771c4dbe60ae43f791b49
dccp ccid-3: Fix error in loss detection

The TFRC loss detection code used the wrong loss condition (RFC 4340, 7.7.1):
 * the difference between sequence numbers s1 and s2 instead of
 * the number of packets missing between s1 and s2 (one less than the distance).

Since this condition appears in many places of the code, it has been put into a
separate function, dccp_loss_free().

Further changes:
----------------
 * tidied up incorrect typing (it was using `int' for u64/s64 types);
 * optimised conditional statements for common case of non-reordered packets;
 * rewrote comments/documentation to match the changes.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
net/dccp/ccids/lib/packet_history.c
net/dccp/dccp.h