]> git.puffer.fish Git - mirror/frr.git/commitdiff
vtysh: fix checking empty interface node 14153/head
authorIgor Ryzhov <iryzhov@nfware.com>
Fri, 4 Aug 2023 21:46:45 +0000 (00:46 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Fri, 4 Aug 2023 21:46:45 +0000 (00:46 +0300)
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>
vtysh/vtysh_config.c

index 593de7ffbc77a56777c10e299225b4ab52a0178f..6254a937667874e775a586b93d94189ac0fb70c5 100644 (file)
@@ -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;
                                }