Skip to content

Commit

Permalink
mgmtd: disable lib code for config reading
Browse files Browse the repository at this point in the history
mgmtd reads config files on its own, it doesn't need libfrr to do that.
It already doesn't do that, because mgmtd uses di->read_in thread for
config reading and libfrr doesn't reschedule the tread, so this commit
just removes the dead code.

Signed-off-by: Igor Ryzhov <[email protected]>
  • Loading branch information
idryzhov committed Feb 3, 2024
1 parent 3a6c312 commit a5f57ca
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions mgmtd/mgmt_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ struct zebra_privs_t mgmt_privs = {
};

static struct frr_daemon_info mgmtd_di;
char backup_config_file[256];

/* SIGHUP handler. */
static void sighup(void)
Expand Down Expand Up @@ -212,7 +211,7 @@ FRR_DAEMON_INFO(mgmtd, MGMTD,
.n_yang_modules = array_size(mgmt_yang_modules),

/* avoid libfrr trying to read our config file for us */
.flags = FRR_MANUAL_VTY_START,
.flags = FRR_MANUAL_VTY_START | FRR_NO_SPLIT_CONFIG,
);
/* clang-format on */

Expand Down Expand Up @@ -274,11 +273,6 @@ int main(int argc, char **argv)
/* MGMTD related initialization. */
mgmt_init();

snprintf(backup_config_file, sizeof(backup_config_file),
"%s/zebra.conf", frr_sysconfdir);
mgmtd_di.backup_config_file = backup_config_file;

/* this will queue a read configs event */
frr_config_fork();

frr_run(mm->master);
Expand Down

0 comments on commit a5f57ca

Please sign in to comment.