Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delay startup ospf #13511

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
ospfd: Add callbacks for config read in start/end
Just add the callbacks, and notice of state we are in.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
  • Loading branch information
donaldsharp committed May 11, 2023
commit 9c778bb3c7ea1c44efe5bdad4ddb0f51d870a71f
18 changes: 18 additions & 0 deletions ospfd/ospf_vty.c
Original file line number Diff line number Diff line change
Expand Up @@ -13107,9 +13107,27 @@ void ospf_vty_clear_init(void)
}


static void ospf_start_config_cb(void)
{
if (IS_DEBUG_OSPF_EVENT)
zlog_debug("%s: Config start read in", __func__);

om->config_being_read_in = true;
}

static void ospf_end_config_cb(void)
{
if (IS_DEBUG_OSPF_EVENT)
zlog_debug("%s: Config end read in", __func__);

om->config_being_read_in = false;
}

/* Install OSPF related vty commands. */
void ospf_vty_init(void)
{
cmd_init_config_callbacks(ospf_start_config_cb, ospf_end_config_cb);

/* Install ospf top node. */
install_node(&ospf_node);

Expand Down
2 changes: 2 additions & 0 deletions ospfd/ospfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -2217,6 +2217,8 @@ void ospf_master_init(struct event_loop *master)
om = &ospf_master;
om->ospf = list_new();
om->master = master;

om->config_being_read_in = false;
}

/* Link OSPF instance to VRF. */
Expand Down
2 changes: 2 additions & 0 deletions ospfd/ospfd.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ struct ospf_master {
/* Various OSPF global configuration. */
uint8_t options;
#define OSPF_MASTER_SHUTDOWN (1 << 0) /* deferred-shutdown */

bool config_being_read_in;
};

struct ospf_redist {
Expand Down