summaryrefslogtreecommitdiffstats
path: root/vtysh
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2023-08-04 23:46:45 +0200
committerIgor Ryzhov <iryzhov@nfware.com>2023-08-04 23:46:45 +0200
commitcedba2406f9c46aa83778185c0e4028fe6f3ee05 (patch)
treeb0e2e83bfd0ac7cf1c38ace7402b6aeaa6b5f796 /vtysh
parentstaticd: fix comparison of nexthop-vrf (diff)
downloadfrr-cedba2406f9c46aa83778185c0e4028fe6f3ee05.tar.xz
frr-cedba2406f9c46aa83778185c0e4028fe6f3ee05.zip
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')
-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 593de7ffb..6254a9376 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;
}