diff options
Diffstat (limited to 'isisd/isis_lsp.c')
| -rw-r--r-- | isisd/isis_lsp.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/isisd/isis_lsp.c b/isisd/isis_lsp.c index 06a5a69e3f..056e29e8de 100644 --- a/isisd/isis_lsp.c +++ b/isisd/isis_lsp.c @@ -60,6 +60,8 @@ #include "isisd/isis_tx_queue.h" #include "isisd/isis_nb.h" +DEFINE_MTYPE_STATIC(ISISD, ISIS_LSP, "ISIS LSP"); + static int lsp_refresh(struct thread *thread); static int lsp_l1_refresh_pseudo(struct thread *thread); static int lsp_l2_refresh_pseudo(struct thread *thread); @@ -1561,18 +1563,28 @@ int _lsp_regenerate_schedule(struct isis_area *area, int level, /* * Schedule LSP refresh ASAP */ - timeout = 0; - if (area->bfd_signalled_down) { sched_debug( - "ISIS (%s): Scheduling immediately due to BDF 'down' message.", + "ISIS (%s): Scheduling immediately due to BFD 'down' message.", area->area_tag); area->bfd_signalled_down = false; area->bfd_force_spf_refresh = true; + timeout = 0; } else { - sched_debug( - "ISIS (%s): Last generation was more than lsp_gen_interval ago. Scheduling for execution now.", - area->area_tag); + int64_t time_since_last = monotime_since( + &area->last_lsp_refresh_event[lvl - 1], + NULL); + timeout = time_since_last < 100000L + ? (100000L - time_since_last)/1000 + : 0; + if (timeout > 0) + sched_debug( + "ISIS (%s): Last generation was more than lsp_gen_interval ago. Scheduling for execution in %ld ms due to the instability timer.", + area->area_tag, timeout); + else + sched_debug( + "ISIS (%s): Last generation was more than lsp_gen_interval ago. Scheduling for execution now.", + area->area_tag); } } |
