aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp
diff options
context:
space:
mode:
Diffstat (limited to 'net/dccp')
-rw-r--r--net/dccp/ccids/ccid3.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c
index df88c54b2ec5..fb1a5e89c023 100644
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -304,11 +304,19 @@ static int ccid3_hc_tx_send_packet(struct sock *sk,
304 break; 304 break;
305 case TFRC_SSTATE_NO_FBACK: 305 case TFRC_SSTATE_NO_FBACK:
306 case TFRC_SSTATE_FBACK: 306 case TFRC_SSTATE_FBACK:
307 delay = (timeval_delta(&now, &hctx->ccid3hctx_t_nom) - 307 delay = timeval_delta(&hctx->ccid3hctx_t_nom, &now);
308 hctx->ccid3hctx_delta); 308 /*
309 delay /= -1000; 309 * Scheduling of packet transmissions [RFC 3448, 4.6]
310 /* divide by -1000 is to convert to ms and get sign right */ 310 *
311 rc = delay > 0 ? delay : 0; 311 * if (t_now > t_nom - delta)
312 * // send the packet now
313 * else
314 * // send the packet in (t_nom - t_now) milliseconds.
315 */
316 if (delay < hctx->ccid3hctx_delta)
317 rc = 0;
318 else
319 rc = delay/1000L;
312 break; 320 break;
313 case TFRC_SSTATE_TERM: 321 case TFRC_SSTATE_TERM:
314 DCCP_BUG("Illegal %s state TERM, sk=%p", dccp_role(sk), sk); 322 DCCP_BUG("Illegal %s state TERM, sk=%p", dccp_role(sk), sk);