Skip to content

Commit

Permalink
isisd: Log error when config-end timeout occurs.
Browse files Browse the repository at this point in the history
Signed-off-by: Acee <[email protected]>
  • Loading branch information
Acee committed Jun 24, 2023
1 parent 3cbc715 commit 119dc48
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions isisd/isis_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ static const struct frr_yang_module_info *const isisd_yang_modules[] = {
/* clang-format on */


/* Max wait time for config to load before generating LSPs */
#define ISIS_PRE_CONFIG_MAX_WAIT_SECONDS 600

static void isis_config_finish(struct event *t)
{
struct listnode *node, *inode;
Expand All @@ -182,12 +185,17 @@ static void isis_config_finish(struct event *t)
}
}

static void isis_config_end_timeout(struct event *t)
{
zlog_err("IS-IS configuration end timer expired after %d seconds.",
ISIS_PRE_CONFIG_MAX_WAIT_SECONDS);
isis_config_finish(t);
}

static void isis_config_start(void)
{
/* Max wait time for config to load before generating lsp */
#define ISIS_PRE_CONFIG_MAX_WAIT_SECONDS 600
EVENT_OFF(t_isis_cfg);
event_add_timer(im->master, isis_config_finish, NULL,
event_add_timer(im->master, isis_config_end_timeout, NULL,
ISIS_PRE_CONFIG_MAX_WAIT_SECONDS, &t_isis_cfg);
}

Expand Down

0 comments on commit 119dc48

Please sign in to comment.