From cedba2406f9c46aa83778185c0e4028fe6f3ee05 Mon Sep 17 00:00:00 2001 From: Igor Ryzhov Date: Sat, 5 Aug 2023 00:46:45 +0300 Subject: [PATCH] vtysh: fix checking empty interface node vtysh is not supposed to show empty interface node in running config, however the corresponding check is broken and empty nodes are shown. Signed-off-by: Igor Ryzhov --- vtysh/vtysh_config.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/vtysh/vtysh_config.c b/vtysh/vtysh_config.c index 593de7ffbc..6254a93766 100644 --- a/vtysh/vtysh_config.c +++ b/vtysh/vtysh_config.c @@ -548,9 +548,7 @@ static void configvec_dump(vector vec, bool nested) * are not under the VRF node. */ if (config->index == INTERFACE_NODE - && (listcount(config->line) == 1) - && (line = listnode_head(config->line)) - && strmatch(line, "exit")) { + && list_isempty(config->line)) { config_del(config); continue; } -- 2.39.5