summaryrefslogtreecommitdiff
path: root/net/core/neighbour.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2021-01-13 17:56:59 +0000
committerMark Brown <broonie@kernel.org>2021-01-13 17:56:59 +0000
commit2d446c98cde3ffccfd14849b7dda4194ab62dd20 (patch)
tree9b7f048dcddec04d94527132834fc056745fdb6d /net/core/neighbour.c
parent44a4cfad8d78efcda9ec0dd97ceea38d8b602f24 (diff)
parent7c53f6b671f4aba70ff15e1b05148b10d58c2837 (diff)
Merge v5.11-rc3
Diffstat (limited to 'net/core/neighbour.c')
-rw-r--r--net/core/neighbour.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 9500d28a43b0..277ed854aef1 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -1569,10 +1569,8 @@ static void neigh_proxy_process(struct timer_list *t)
void pneigh_enqueue(struct neigh_table *tbl, struct neigh_parms *p,
struct sk_buff *skb)
{
- unsigned long now = jiffies;
-
- unsigned long sched_next = now + (prandom_u32() %
- NEIGH_VAR(p, PROXY_DELAY));
+ unsigned long sched_next = jiffies +
+ prandom_u32_max(NEIGH_VAR(p, PROXY_DELAY));
if (tbl->proxy_queue.qlen > NEIGH_VAR(p, PROXY_QLEN)) {
kfree_skb(skb);