Skip to contentSkip to conversation

neigh: fix ARP retransmit timer guard

PATCH Applied Hangbin Liu 2 participants 2 messages May 28, 2020 – May 29, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

Fixes 19e16d220f0a ("neigh: support smaller retrans_time settting")
---
 net/core/neighbour.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
net/core/neighbour.c +2 -2
index 116139233d57..dbe0c6ead773 100644
@@ -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);
 	}
Signature · 1 line
2.25.4
maintainer Applied
#1 lore raw

From: Hangbin Liu <[email protected]>
Date: Thu, 28 May 2020 15:15:13 +0800

Quoted 11 lines

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.

Fixes 19e16d220f0a ("neigh: support smaller retrans_time settting")

Applied, thank you.