Commit f4ab2317 authored by Martin Mareš's avatar Martin Mareš

bgp_get_status: If protocol is down, don't print BGP state.

parent cbfd671f
Core
~~~~
- config: try to unify expressions
- static: check validity of route destination?
- configure: default CFLAGS?
- filters: deletion of mandatory attributes?
- filters: user defined attributes?
- filters: arithmetics and define'd symbols
- kernel: persistent mode
......@@ -22,7 +19,6 @@ Core
- bgp: timing of updates?
- bgp: dump and get_route_info
- bgp: when protocol is down, don't print Idle state
- proto: Don't show repeated `Changed state to ...' messages if only internal states change
......
......@@ -503,7 +503,10 @@ bgp_get_status(struct proto *P, byte *buf)
{
struct bgp_proto *p = (struct bgp_proto *) P;
strcpy(buf, bgp_state_names[MAX(p->incoming_conn.state, p->outgoing_conn.state)]);
if (P->proto_state == PS_DOWN)
buf[0] = 0;
else
strcpy(buf, bgp_state_names[MAX(p->incoming_conn.state, p->outgoing_conn.state)]);
}
static int
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment