diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2020-05-14 03:48:17 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2020-06-28 15:38:47 +0200 |
commit | c26c6bc2d78a2fe76f27dcc9fbb5afc95c3a7626 (patch) | |
tree | b9058f04982a155d2a214e488e143bf1fac36597 /proto/babel/babel.c | |
parent | a948cf9a5c338518773e6c98e895c829c469f56b (diff) |
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.
Diffstat (limited to 'proto/babel/babel.c')
-rw-r--r-- | proto/babel/babel.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/proto/babel/babel.c b/proto/babel/babel.c index ba98598b..618abaa8 100644 --- a/proto/babel/babel.c +++ b/proto/babel/babel.c @@ -1891,7 +1891,6 @@ babel_show_interfaces(struct proto *P, const char *iff) if (p->p.proto_state != PS_UP) { cli_msg(-1023, "%s: is not up", p->p.name); - cli_msg(0, ""); return; } @@ -1915,8 +1914,6 @@ babel_show_interfaces(struct proto *P, const char *iff) ifa->cf->rxcost, nbrs, MAX(timer, 0), ifa->next_hop_ip4, ifa->next_hop_ip6); } - - cli_msg(0, ""); } void @@ -1930,7 +1927,6 @@ babel_show_neighbors(struct proto *P, const char *iff) if (p->p.proto_state != PS_UP) { cli_msg(-1024, "%s: is not up", p->p.name); - cli_msg(0, ""); return; } @@ -1955,8 +1951,6 @@ babel_show_neighbors(struct proto *P, const char *iff) n->addr, ifa->iface->name, n->cost, rts, hellos, MAX(timer, 0)); } } - - cli_msg(0, ""); } static void @@ -1998,7 +1992,6 @@ babel_show_entries(struct proto *P) if (p->p.proto_state != PS_UP) { cli_msg(-1025, "%s: is not up", p->p.name); - cli_msg(0, ""); return; } @@ -2008,8 +2001,6 @@ babel_show_entries(struct proto *P) babel_show_entries_(p, &p->ip4_rtable); babel_show_entries_(p, &p->ip6_rtable); - - cli_msg(0, ""); } static void @@ -2041,7 +2032,6 @@ babel_show_routes(struct proto *P) if (p->p.proto_state != PS_UP) { cli_msg(-1025, "%s: is not up", p->p.name); - cli_msg(0, ""); return; } @@ -2051,8 +2041,6 @@ babel_show_routes(struct proto *P) babel_show_routes_(p, &p->ip4_rtable); babel_show_routes_(p, &p->ip6_rtable); - - cli_msg(0, ""); } |