Merge pull request #8291 from volta-networks/isis_timer_unstable

isisd: avoid lsp_sched loop when unstable
This commit is contained in:
Donald Sharp 2021-03-20 19:52:01 -04:00 committed by GitHub
commit cd28e264a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1561,18 +1561,28 @@ int _lsp_regenerate_schedule(struct isis_area *area, int level,
/* /*
* Schedule LSP refresh ASAP * Schedule LSP refresh ASAP
*/ */
timeout = 0;
if (area->bfd_signalled_down) { if (area->bfd_signalled_down) {
sched_debug( sched_debug(
"ISIS (%s): Scheduling immediately due to BDF 'down' message.", "ISIS (%s): Scheduling immediately due to BDF 'down' message.",
area->area_tag); area->area_tag);
area->bfd_signalled_down = false; area->bfd_signalled_down = false;
area->bfd_force_spf_refresh = true; area->bfd_force_spf_refresh = true;
timeout = 0;
} else { } else {
sched_debug( int64_t time_since_last = monotime_since(
"ISIS (%s): Last generation was more than lsp_gen_interval ago. Scheduling for execution now.", &area->last_lsp_refresh_event[lvl - 1],
area->area_tag); 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);
} }
} }