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