From 8ab2f0d18d3c69101644961191ea5890a68d6447 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Sun, 10 Jul 2022 21:40:32 +0300 Subject: [PATCH] Revert "isisd: fix SPF scheduling on IPv6 only topology" This reverts commit d95cd33545006004424736d20a0226b5cd9fb47a. --- isisd/isis_spf.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/isisd/isis_spf.c b/isisd/isis_spf.c index d7335e06d1..5ec07ddfff 100644 --- a/isisd/isis_spf.c +++ b/isisd/isis_spf.c @@ -1931,19 +1931,9 @@ void isis_spf_timer_free(void *run) int _isis_spf_schedule(struct isis_area *area, int level, const char *func, const char *file, int line) { - struct isis_spftree *spftree; - time_t now; - long tree_diff, diff; - int tree; - - now = monotime(NULL); - diff = 0; - for (tree = SPFTREE_IPV4; tree < SPFTREE_COUNT; tree++) { - spftree = area->spftree[tree][level - 1]; - tree_diff = difftime(now - spftree->last_run_monotime, 0); - if (tree_diff != now && (diff == 0 || tree_diff < diff)) - diff = tree_diff; - } + struct isis_spftree *spftree = area->spftree[SPFTREE_IPV4][level - 1]; + time_t now = monotime(NULL); + int diff = now - spftree->last_run_monotime; if (CHECK_FLAG(im->options, F_ISIS_UNIT_TEST)) return 0; @@ -1953,7 +1943,7 @@ int _isis_spf_schedule(struct isis_area *area, int level, if (IS_DEBUG_SPF_EVENTS) { zlog_debug( - "ISIS-SPF (%s) L%d SPF schedule called, lastrun %ld sec ago Caller: %s %s:%d", + "ISIS-SPF (%s) L%d SPF schedule called, lastrun %d sec ago Caller: %s %s:%d", area->area_tag, level, diff, func, file, line); } -- 2.39.5