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>
This commit is contained in:
Igor Ryzhov 2023-08-05 00:46:45 +03:00
parent 3eb4d42e62
commit cedba2406f

View 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;
}