diff options
author | Matt Mower <mowerm@gmail.com> | 2016-08-23 01:02:26 -0500 |
---|---|---|
committer | Ziyan <jaraidaniel@gmail.com> | 2016-10-29 01:33:55 +0200 |
commit | 6a89544efa4518c8cfc4ebbacab8c914748951f3 (patch) | |
tree | a3a2d17b25f2dce970340eb95dfa12844de1d99a /net/ipv4 | |
parent | ab8bc2f414f2d8ddbddc2a6548e3f10ceea3eeff (diff) | |
download | kernel_samsung_tuna-6a89544efa4518c8cfc4ebbacab8c914748951f3.zip kernel_samsung_tuna-6a89544efa4518c8cfc4ebbacab8c914748951f3.tar.gz kernel_samsung_tuna-6a89544efa4518c8cfc4ebbacab8c914748951f3.tar.bz2 |
tcp: Use supported random32 in pre-3.8 kernels
Commit 'tcp: make challenge acks less predictable' makes use of
prandom_u32(), which was not introduced until kernel 3.8. It is
essentially a more accurate name given to random32() available in
pre-3.8 kernels.
Change-Id: I6cd471acd68b0c4d08e87aaea28c2284b8c9fce0
Signed-off-by: Matt Mower <mowerm@gmail.com>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/tcp_input.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 5e16e92..a60f386 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -3657,7 +3657,7 @@ static void tcp_send_challenge_ack(struct sock *sk) challenge_timestamp = now; ACCESS_ONCE(challenge_count) = half + - reciprocal_divide(prandom_u32(), + reciprocal_divide(random32(), sysctl_tcp_challenge_ack_limit); } count = ACCESS_ONCE(challenge_count); |