From fd506bbb4ddaa65399c91b8c2584f183ee8b8f88 Mon Sep 17 00:00:00 2001 From: Emanuele Di Pascale Date: Tue, 7 Apr 2020 18:41:15 +0200 Subject: [PATCH] isisd: fix two 'no X' commands for some reason, when issuing a 'no metric-style' command we were setting the metric-style to narrow, even though the default is actually wide. Use NULL to avoid similar problems in the future. Likewise, the 'no is-type' command was still trying to implement the old logic of applying a different default for the first area. In practice this had no effect because the value would now be the same in both cases, but it's better to remove useless code anyway. Signed-off-by: Emanuele Di Pascale --- isisd/isis_cli.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/isisd/isis_cli.c b/isisd/isis_cli.c index 2483d26833..b5e52d82a3 100644 --- a/isisd/isis_cli.c +++ b/isisd/isis_cli.c @@ -402,21 +402,7 @@ DEFPY(no_is_type, no_is_type_cmd, "Act as both a station router and an area router\n" "Act as an area router only\n") { - const char *value = NULL; - struct isis_area *area; - - area = nb_running_get_entry(NULL, VTY_CURR_XPATH, false); - - /* - * Put the is-type back to defaults: - * - level-1-2 on first area - * - level-1 for the rest - */ - if (area && listgetdata(listhead(isis->area_list)) == area) - value = "level-1-2"; - else - value = NULL; - nb_cli_enqueue_change(vty, "./is-type", NB_OP_MODIFY, value); + nb_cli_enqueue_change(vty, "./is-type", NB_OP_MODIFY, NULL); return nb_cli_apply_changes(vty, NULL); } @@ -527,7 +513,7 @@ DEFPY(no_metric_style, no_metric_style_cmd, "Send and accept both styles of TLVs during transition\n" "Use new style of TLVs to carry wider metric\n") { - nb_cli_enqueue_change(vty, "./metric-style", NB_OP_MODIFY, "narrow"); + nb_cli_enqueue_change(vty, "./metric-style", NB_OP_MODIFY, NULL); return nb_cli_apply_changes(vty, NULL); }