Use more preferable function name which implies using a pseudo-random
number generator.

Signed-off-by: Akinobu Mita <akinobu.m...@gmail.com>
Cc: Pablo Neira Ayuso <pa...@netfilter.org>
Cc: Patrick McHardy <ka...@trash.net>
Cc: netfilter-de...@vger.kernel.org
Cc: netfil...@vger.kernel.org
Cc: coret...@netfilter.org
Cc: "David S. Miller" <da...@davemloft.net>
Cc: net...@vger.kernel.org
---

* Change from v1
- leave net_random() callers as-is because that is a useful indirection

 net/netfilter/nf_conntrack_core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/netfilter/nf_conntrack_core.c 
b/net/netfilter/nf_conntrack_core.c
index 08cdc71..a8f5c7a 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -263,7 +263,7 @@ static void death_by_event(unsigned long ul_conntrack)
        if (nf_conntrack_event(IPCT_DESTROY, ct) < 0) {
                /* bad luck, let's retry again */
                ecache->timeout.expires = jiffies +
-                       (random32() % net->ct.sysctl_events_retry_timeout);
+                       (prandom_u32() % net->ct.sysctl_events_retry_timeout);
                add_timer(&ecache->timeout);
                return;
        }
@@ -282,7 +282,7 @@ void nf_ct_dying_timeout(struct nf_conn *ct)
        /* set a new timer to retry event delivery */
        setup_timer(&ecache->timeout, death_by_event, (unsigned long)ct);
        ecache->timeout.expires = jiffies +
-               (random32() % net->ct.sysctl_events_retry_timeout);
+               (prandom_u32() % net->ct.sysctl_events_retry_timeout);
        add_timer(&ecache->timeout);
 }
 EXPORT_SYMBOL_GPL(nf_ct_dying_timeout);
-- 
1.7.11.7

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to