diff options
Diffstat (limited to '')
-rw-r--r-- | ldpd/neighbor.c | 15 |
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); |