diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2019-10-09 22:17:08 -0300 |
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2019-10-11 21:18:36 -0300 |
| commit | 91f9fd78cb32396e95567fc59ec9741b620c22be (patch) | |
| tree | 88781f91e3e645226c210ea9c433881dc2c32336 /lib/vty.c | |
| parent | 5e6a9350c16f54113eeedb497c98fe45b8ce6222 (diff) | |
lib: optimize loading of the startup configuration
Load the startup configuration directly into the CLI shared candidate
configuration instead of loading it into a private candidate
configuration. This way we don't need to initialize the shared
candidate separately later as a copy of the running configuration,
which is a potentially expensive operation.
Also, make the northbound process SIGHUP correctly even when --tcli
is not used.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'lib/vty.c')
| -rw-r--r-- | lib/vty.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -2341,8 +2341,7 @@ static void vty_read_file(struct nb_config *config, FILE *confp) * Automatically commit the candidate configuration after * reading the configuration file. */ - if (config == NULL && vty->candidate_config - && frr_get_cli_mode() == FRR_CLI_TRANSACTIONAL) { + if (config == NULL) { ret = nb_candidate_commit(vty->candidate_config, NB_CLIENT_CLI, vty, true, "Read configuration file", NULL); |
