Commit 546d9171 authored by Hideaki Yoshifuji's avatar Hideaki Yoshifuji Committed by David S. Miller

[NET]: Fix kernel oops if base_reachable_time is set to zero.

Signed-off-by: default avatarHideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4b4076ac
...@@ -109,7 +109,7 @@ static int neigh_blackhole(struct sk_buff *skb) ...@@ -109,7 +109,7 @@ static int neigh_blackhole(struct sk_buff *skb)
unsigned long neigh_rand_reach_time(unsigned long base) unsigned long neigh_rand_reach_time(unsigned long base)
{ {
return (net_random() % base) + (base >> 1); return (base ? (net_random() % base) + (base >> 1) : 0);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment