diff options
author | Christian Hopps <chopps@labn.net> | 2023-03-31 18:34:49 +0200 |
---|---|---|
committer | Christian Hopps <chopps@labn.net> | 2023-04-02 00:06:43 +0200 |
commit | 8033bf3976d85c84f00a3ab320eca5fc8418d756 (patch) | |
tree | 945221853843902b26bb0ba00facc01dae628ad7 /staticd/static_main.c | |
parent | mgmtd: remove startup config feature for now (diff) | |
download | frr-8033bf3976d85c84f00a3ab320eca5fc8418d756.tar.xz frr-8033bf3976d85c84f00a3ab320eca5fc8418d756.zip |
mgmtd: lib: read transitioned daemons split config files in mgmtd
When daemons transition to mgmtd they should stop reading their split config
files, and let mgmtd do that, otherwise things can get out of sync.
Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'staticd/static_main.c')
-rw-r--r-- | staticd/static_main.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/staticd/static_main.c b/staticd/static_main.c index 09f22318f..9809d9751 100644 --- a/staticd/static_main.c +++ b/staticd/static_main.c @@ -161,6 +161,10 @@ static const struct frr_yang_module_info *const staticd_yang_modules[] = { #define STATIC_VTY_PORT 2616 +/* + * NOTE: .flags == FRR_NO_SPLIT_CONFIG to avoid reading split config, mgmtd will + * do this for us now + */ FRR_DAEMON_INFO(staticd, STATIC, .vty_port = STATIC_VTY_PORT, .proghelp = "Implementation of STATIC.", @@ -170,7 +174,8 @@ FRR_DAEMON_INFO(staticd, STATIC, .vty_port = STATIC_VTY_PORT, .privs = &static_privs, .yang_modules = staticd_yang_modules, .n_yang_modules = array_size(staticd_yang_modules), -); + + .flags = FRR_NO_SPLIT_CONFIG); int main(int argc, char **argv, char **envp) { @@ -210,9 +215,12 @@ int main(int argc, char **argv, char **envp) routing_control_plane_protocols_register_vrf_dependency(); - snprintf(backup_config_file, sizeof(backup_config_file), - "%s/zebra.conf", frr_sysconfdir); - staticd_di.backup_config_file = backup_config_file; + /* + * We set FRR_NO_SPLIT_CONFIG flag to avoid reading our config, but we + * still need to write one if vtysh tells us to. Setting the host + * config filename does this. + */ + host_config_set(config_default); frr_config_fork(); frr_run(master); |