mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-27 17:16:11 +00:00
Merge pull request #4506 from opensourcerouting/fix-outdated-candidate
lib: fix outdated candidate configuration issue
This commit is contained in:
commit
230113cf71
@ -1053,10 +1053,17 @@ static int cmd_execute_command_real(vector vline, enum cmd_filter_type filter,
|
|||||||
if (matched_element->daemon)
|
if (matched_element->daemon)
|
||||||
ret = CMD_SUCCESS_DAEMON;
|
ret = CMD_SUCCESS_DAEMON;
|
||||||
else {
|
else {
|
||||||
/* Clear enqueued configuration changes. */
|
if (vty->config) {
|
||||||
|
/* Clear array of enqueued configuration changes. */
|
||||||
vty->num_cfg_changes = 0;
|
vty->num_cfg_changes = 0;
|
||||||
memset(&vty->cfg_changes, 0, sizeof(vty->cfg_changes));
|
memset(&vty->cfg_changes, 0, sizeof(vty->cfg_changes));
|
||||||
|
|
||||||
|
/* Regenerate candidate configuration. */
|
||||||
|
if (frr_get_cli_mode() == FRR_CLI_CLASSIC)
|
||||||
|
nb_config_replace(vty->candidate_config,
|
||||||
|
running_config, true);
|
||||||
|
}
|
||||||
|
|
||||||
ret = matched_element->func(matched_element, vty, argc, argv);
|
ret = matched_element->func(matched_element, vty, argc, argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2289,6 +2289,7 @@ static void vty_read_file(struct nb_config *config, FILE *confp)
|
|||||||
vty->wfd = STDERR_FILENO;
|
vty->wfd = STDERR_FILENO;
|
||||||
vty->type = VTY_FILE;
|
vty->type = VTY_FILE;
|
||||||
vty->node = CONFIG_NODE;
|
vty->node = CONFIG_NODE;
|
||||||
|
vty->config = true;
|
||||||
if (config)
|
if (config)
|
||||||
vty->candidate_config = config;
|
vty->candidate_config = config;
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user