diff options
Diffstat (limited to 'lib/command.c')
| -rw-r--r-- | lib/command.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/command.c b/lib/command.c index e5e0623163..f257c7d0f9 100644 --- a/lib/command.c +++ b/lib/command.c @@ -48,7 +48,7 @@ #include "lib_errors.h" #include "northbound_cli.h" -DEFINE_MTYPE(LIB, HOST, "Host config") +DEFINE_MTYPE_STATIC(LIB, HOST, "Host config") DEFINE_MTYPE(LIB, COMPLETION, "Completion item") #define item(x) \ @@ -84,6 +84,7 @@ const char *node_names[] = { "vrf debug", // VRF_DEBUG_NODE, "northbound debug", // NORTHBOUND_DEBUG_NODE, "vnc debug", // DEBUG_VNC_NODE, + "route-map debug", /* RMAP_DEBUG_NODE */ "aaa", // AAA_NODE, "keychain", // KEYCHAIN_NODE, "keychain key", // KEYCHAIN_KEY_NODE, @@ -1053,9 +1054,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); } |
