diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-06-13 06:01:28 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-06-13 06:01:28 -0400 |
| commit | 230113cf7123d2d1b9c686368e44a5b320fd8fc9 (patch) | |
| tree | 8fdcceece655b40e3c22775fdeb9c68dce9370c7 /lib/command.c | |
| parent | 8b40649e0d728ab8b74a8c9dc2434f638e06b36c (diff) | |
| parent | eaf6705d7a9fdcfd48c8fb51fc4fe7cffd7701f2 (diff) | |
Merge pull request #4506 from opensourcerouting/fix-outdated-candidate
lib: fix outdated candidate configuration issue
Diffstat (limited to 'lib/command.c')
| -rw-r--r-- | lib/command.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/command.c b/lib/command.c index e5e0623163..0e16f30a8a 100644 --- a/lib/command.c +++ b/lib/command.c @@ -1053,9 +1053,16 @@ static int cmd_execute_command_real(vector vline, enum cmd_filter_type filter, if (matched_element->daemon) ret = CMD_SUCCESS_DAEMON; else { - /* Clear enqueued configuration changes. */ - vty->num_cfg_changes = 0; - memset(&vty->cfg_changes, 0, sizeof(vty->cfg_changes)); + if (vty->config) { + /* Clear array of enqueued configuration changes. */ + vty->num_cfg_changes = 0; + 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); } |
