Skip to content

Commit

Permalink
[DCCP] ccid3: return value in ccid3_hc_rx_calc_first_li
Browse files Browse the repository at this point in the history
In a recent patch we introduced invalid return codes which will result in the
opposite of what is intended (i.e. send more packets in face of peculiar
network conditions).

This fixes it by returning ~0 which means not calculated as per
dccp_li_hist_calc_i_mean.

Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
  • Loading branch information
Ian McDonald authored and David S. Miller committed Dec 14, 2006
1 parent e1b4b9f commit 832e3ca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions net/dccp/ccids/ccid3.c
Original file line number Diff line number Diff line change
Expand Up @@ -845,8 +845,8 @@ static u32 ccid3_hc_rx_calc_first_li(struct sock *sk)
* Find some p such that f(p) = fval; return 1/p [RFC 3448, 6.3.1].
*/
if (rtt == 0) { /* would result in divide-by-zero */
DCCP_WARN("RTT==0, returning 1/p = 1\n");
return 1000000;
DCCP_WARN("RTT==0\n");
return ~0;
}

dccp_timestamp(sk, &tstamp);
Expand All @@ -858,7 +858,7 @@ static u32 ccid3_hc_rx_calc_first_li(struct sock *sk)
DCCP_WARN("X_recv==0\n");
if ((x_recv = hcrx->ccid3hcrx_x_recv) == 0) {
DCCP_BUG("stored value of X_recv is zero");
return 1000000;
return ~0;
}
}

Expand Down

0 comments on commit 832e3ca

Please sign in to comment.