diff options
author | Hangbin Liu <liuhangbin@gmail.com> | 2020-05-28 15:15:13 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-05-29 16:56:53 -0700 |
commit | 96d10d5b192e7f064457fd957e6a3ce8c2dce4b4 (patch) | |
tree | bf1184fe334ca092ebf06a492c882d29db7e2251 | |
parent | f2b122d3d6ff2f2bef0f23e6cb2b56384da7f92a (diff) | |
download | linux-96d10d5b192e7f064457fd957e6a3ce8c2dce4b4.tar.bz2 |
neigh: fix ARP retransmit timer guard
In commit 19e16d220f0a ("neigh: support smaller retrans_time settting")
we add more accurate control for ARP and NS. But for ARP I forgot to
update the latest guard in neigh_timer_handler(), then the next
retransmit would be reset to jiffies + HZ/2 if we set the retrans_time
less than 500ms. Fix it by setting the time_before() check to HZ/100.
IPv6 does not have this issue.
Reported-by: Jianwen Ji <jiji@redhat.com>
Fixes: 19e16d220f0a ("neigh: support smaller retrans_time settting")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/core/neighbour.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 116139233d57..dbe0c6ead773 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -1082,8 +1082,8 @@ static void neigh_timer_handler(struct timer_list *t) } if (neigh->nud_state & NUD_IN_TIMER) { - if (time_before(next, jiffies + HZ/2)) - next = jiffies + HZ/2; + if (time_before(next, jiffies + HZ/100)) + next = jiffies + HZ/100; if (!mod_timer(&neigh->timer, next)) neigh_hold(neigh); } |