Skip to content

Commit 96d10d5

Browse files
liuhangbindavem330
authored andcommitted
neigh: fix ARP retransmit timer guard
In commit 19e16d2 ("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 <[email protected]> Fixes: 19e16d2 ("neigh: support smaller retrans_time settting") Signed-off-by: Hangbin Liu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent f2b122d commit 96d10d5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/core/neighbour.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,8 +1082,8 @@ static void neigh_timer_handler(struct timer_list *t)
10821082
}
10831083

10841084
if (neigh->nud_state & NUD_IN_TIMER) {
1085-
if (time_before(next, jiffies + HZ/2))
1086-
next = jiffies + HZ/2;
1085+
if (time_before(next, jiffies + HZ/100))
1086+
next = jiffies + HZ/100;
10871087
if (!mod_timer(&neigh->timer, next))
10881088
neigh_hold(neigh);
10891089
}

0 commit comments

Comments
 (0)