diff options
author | Lou Berger <lberger@labn.net> | 2018-06-22 19:13:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-22 19:13:05 +0200 |
commit | ec446a4673631437823065eb47672549e3be9766 (patch) | |
tree | 5aa01d0a9f2162ff4f727413773544b1a56087d4 /ldpd | |
parent | Merge pull request #2501 from pacovn/infer_unused1 (diff) | |
parent | doc: Add --log-level documentation (diff) | |
download | frr-ec446a4673631437823065eb47672549e3be9766.tar.xz frr-ec446a4673631437823065eb47672549e3be9766.zip |
Merge pull request #2449 from donaldsharp/lib_delayed_read
Lib delayed read
Diffstat (limited to 'ldpd')
-rw-r--r-- | ldpd/ldpd.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/ldpd/ldpd.c b/ldpd/ldpd.c index b265c98da..b51ff82ce 100644 --- a/ldpd/ldpd.c +++ b/ldpd/ldpd.c @@ -187,6 +187,22 @@ FRR_DAEMON_INFO(ldpd, LDP, .privs = &ldpd_privs, ) +static int ldp_config_fork_apply(struct thread *t) +{ + /* + * So the frr_config_fork() function schedules + * the read of the vty config( if there is a + * non-integrated config ) to be after the + * end of startup and we are starting the + * main process loop. We need to schedule + * the application of this if necessary + * after the read in of the config. + */ + ldp_config_apply(NULL, vty_conf); + + return 0; +} + int main(int argc, char *argv[]) { @@ -195,6 +211,7 @@ main(int argc, char *argv[]) int pipe_parent2ldpe[2], pipe_parent2ldpe_sync[2]; int pipe_parent2lde[2], pipe_parent2lde_sync[2]; char *ctl_sock_name; + struct thread *thread = NULL; ldpd_process = PROC_MAIN; log_procname = log_procnames[ldpd_process]; @@ -331,7 +348,7 @@ main(int argc, char *argv[]) frr_config_fork(); /* apply configuration */ - ldp_config_apply(NULL, vty_conf); + thread_add_event(master, ldp_config_fork_apply, NULL, 0, &thread); /* setup pipes to children */ if ((iev_ldpe = calloc(1, sizeof(struct imsgev))) == NULL || |