aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2013-04-29 19:21:39 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-29 21:28:43 -0400
commitca3d41a588d3cceb06e151cf31cc73f910384e2b (patch)
tree657815aa9c4f4b9e520a4f6b5dcb903bef6f2ae2 /net
parent5106f3bd8164ee269ba857eb50d123010666a276 (diff)
net/netfilter: rename random32() to prandom_u32()
Use preferable function name which implies using a pseudo-random number generator. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Pablo Neira Ayuso <pablo@netfilter.org> Cc: Patrick McHardy <kaber@trash.net> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/nf_conntrack_core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index c8e001a9c45b..f84965af4a4e 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -264,7 +264,7 @@ static void death_by_event(unsigned long ul_conntrack)
264 if (nf_conntrack_event(IPCT_DESTROY, ct) < 0) { 264 if (nf_conntrack_event(IPCT_DESTROY, ct) < 0) {
265 /* bad luck, let's retry again */ 265 /* bad luck, let's retry again */
266 ecache->timeout.expires = jiffies + 266 ecache->timeout.expires = jiffies +
267 (random32() % net->ct.sysctl_events_retry_timeout); 267 (prandom_u32() % net->ct.sysctl_events_retry_timeout);
268 add_timer(&ecache->timeout); 268 add_timer(&ecache->timeout);
269 return; 269 return;
270 } 270 }
@@ -283,7 +283,7 @@ void nf_ct_dying_timeout(struct nf_conn *ct)
283 /* set a new timer to retry event delivery */ 283 /* set a new timer to retry event delivery */
284 setup_timer(&ecache->timeout, death_by_event, (unsigned long)ct); 284 setup_timer(&ecache->timeout, death_by_event, (unsigned long)ct);
285 ecache->timeout.expires = jiffies + 285 ecache->timeout.expires = jiffies +
286 (random32() % net->ct.sysctl_events_retry_timeout); 286 (prandom_u32() % net->ct.sysctl_events_retry_timeout);
287 add_timer(&ecache->timeout); 287 add_timer(&ecache->timeout);
288} 288}
289EXPORT_SYMBOL_GPL(nf_ct_dying_timeout); 289EXPORT_SYMBOL_GPL(nf_ct_dying_timeout);