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>
This commit is contained in:
parent
5106f3bd81
commit
ca3d41a588
|
@ -264,7 +264,7 @@ static void death_by_event(unsigned long ul_conntrack)
|
||||||
if (nf_conntrack_event(IPCT_DESTROY, ct) < 0) {
|
if (nf_conntrack_event(IPCT_DESTROY, ct) < 0) {
|
||||||
/* bad luck, let's retry again */
|
/* bad luck, let's retry again */
|
||||||
ecache->timeout.expires = jiffies +
|
ecache->timeout.expires = jiffies +
|
||||||
(random32() % net->ct.sysctl_events_retry_timeout);
|
(prandom_u32() % net->ct.sysctl_events_retry_timeout);
|
||||||
add_timer(&ecache->timeout);
|
add_timer(&ecache->timeout);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -283,7 +283,7 @@ void nf_ct_dying_timeout(struct nf_conn *ct)
|
||||||
/* set a new timer to retry event delivery */
|
/* set a new timer to retry event delivery */
|
||||||
setup_timer(&ecache->timeout, death_by_event, (unsigned long)ct);
|
setup_timer(&ecache->timeout, death_by_event, (unsigned long)ct);
|
||||||
ecache->timeout.expires = jiffies +
|
ecache->timeout.expires = jiffies +
|
||||||
(random32() % net->ct.sysctl_events_retry_timeout);
|
(prandom_u32() % net->ct.sysctl_events_retry_timeout);
|
||||||
add_timer(&ecache->timeout);
|
add_timer(&ecache->timeout);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(nf_ct_dying_timeout);
|
EXPORT_SYMBOL_GPL(nf_ct_dying_timeout);
|
||||||
|
|
Loading…
Reference in New Issue