Skip to content

Commit

Permalink
[CCID3]: Fix a bug in the send time processing
Browse files Browse the repository at this point in the history
ccid3_hc_tx_send_packet currently returns 0 when the time difference between
current time and t_nom is less than 1000 microseconds.

In this case the packet is sent immediately; but, unlike other packets that can
be emitted on first attempt, it will not have its window counter updated and
its options set as required. This is a bug.

Fix: Require the time difference to be at least 1000 microseconds. The
algorithm then converges: time differences > 1000 microseconds trigger the
timer in dccp_write_xmit; after timer expiry this function is tried again; when
the time difference is less than 1000, the packet will have its options added
and window counter updated as required.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
  • Loading branch information
Gerrit Renker authored and David S. Miller committed Jul 11, 2007
1 parent 8132da4 commit 49d66a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/dccp/ccids/ccid3.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ static int ccid3_hc_tx_send_packet(struct sock *sk, struct sk_buff *skb)
* else
* // send the packet in (t_nom - t_now) milliseconds.
*/
if (delay - (s64)hctx->ccid3hctx_delta >= 0)
if (delay - (s64)hctx->ccid3hctx_delta >= 1000)
return (u32)delay / 1000L;

ccid3_hc_tx_update_win_count(hctx, now);
Expand Down

0 comments on commit 49d66a7

Please sign in to comment.