From c26c6bc2d78a2fe76f27dcc9fbb5afc95c3a7626 Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Thu, 14 May 2020 03:48:17 +0200 Subject: Show info from multiple protocols when protocol is not specified Most commands like 'show ospf neighbors' fail when protocol is not specified and there are multiple instances of given protocol type. This is annoying in BIRD 2, as many protocols have IPv4 and IPv6 instances. The patch changes that by showing output from all protocol instances of appropriate type. Note that the patch also removes terminating cli_msg() call from these commands and moves it to the common iterating code. --- proto/rip/rip.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'proto/rip/rip.c') diff --git a/proto/rip/rip.c b/proto/rip/rip.c index f3dc6353..5c53ab1e 100644 --- a/proto/rip/rip.c +++ b/proto/rip/rip.c @@ -1232,7 +1232,6 @@ rip_show_interfaces(struct proto *P, const char *iff) if (p->p.proto_state != PS_UP) { cli_msg(-1021, "%s: is not up", p->p.name); - cli_msg(0, ""); return; } @@ -1256,8 +1255,6 @@ rip_show_interfaces(struct proto *P, const char *iff) cli_msg(-1021, "%-10s %-6s %6u %6u %7t", ifa->iface->name, (ifa->up ? "Up" : "Down"), ifa->cf->metric, nbrs, timer); } - - cli_msg(0, ""); } void @@ -1270,7 +1267,6 @@ rip_show_neighbors(struct proto *P, const char *iff) if (p->p.proto_state != PS_UP) { cli_msg(-1022, "%s: is not up", p->p.name); - cli_msg(0, ""); return; } @@ -1293,8 +1289,6 @@ rip_show_neighbors(struct proto *P, const char *iff) n->nbr->addr, ifa->iface->name, ifa->cf->metric, n->uc, timer); } } - - cli_msg(0, ""); } static void -- cgit v1.2.3