summaryrefslogtreecommitdiff
path: root/vtysh/vtysh_config.c
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2023-08-05 00:46:45 +0300
committerIgor Ryzhov <iryzhov@nfware.com>2023-08-05 00:46:45 +0300
commitcedba2406f9c46aa83778185c0e4028fe6f3ee05 (patch)
treeb0e2e83bfd0ac7cf1c38ace7402b6aeaa6b5f796 /vtysh/vtysh_config.c
parent3eb4d42e62bd47a3265f5b08ec372108ef1388d8 (diff)
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 <iryzhov@nfware.com>
Diffstat (limited to 'vtysh/vtysh_config.c')
-rw-r--r--vtysh/vtysh_config.c4
1 files changed, 1 insertions, 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;
}