summaryrefslogtreecommitdiffstats
path: root/ldpd/neighbor.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 04:24:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 04:24:31 +0000
commitacb594b1d825c6e12369cebb941968ec08c840ce (patch)
treed544788908e7353a4f117e2991f15f4236a0c963 /ldpd/neighbor.c
parentAdding upstream version 9.1. (diff)
downloadfrr-acb594b1d825c6e12369cebb941968ec08c840ce.tar.xz
frr-acb594b1d825c6e12369cebb941968ec08c840ce.zip
Adding upstream version 10.0.upstream/10.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ldpd/neighbor.c')
-rw-r--r--ldpd/neighbor.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/ldpd/neighbor.c b/ldpd/neighbor.c
index 5209c55..d40728b 100644
--- a/ldpd/neighbor.c
+++ b/ldpd/neighbor.c
@@ -505,21 +505,12 @@ nbr_start_idtimer(struct nbr *nbr)
{
int secs;
- secs = INIT_DELAY_TMR;
- switch(nbr->idtimer_cnt) {
- default:
+ if (nbr->idtimer_cnt > 2) {
/* do not further increase the counter */
secs = MAX_DELAY_TMR;
- break;
- case 2:
- secs *= 2;
- /* FALLTHROUGH */
- case 1:
- secs *= 2;
- /* FALLTHROUGH */
- case 0:
+ } else {
+ secs = INIT_DELAY_TMR * (1 << nbr->idtimer_cnt);
nbr->idtimer_cnt++;
- break;
}
EVENT_OFF(nbr->initdelay_timer);