]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
bgp_get_status: If protocol is down, don't print BGP state.
authorMartin Mares <mj@ucw.cz>
Mon, 15 May 2000 12:19:28 +0000 (12:19 +0000)
committerMartin Mares <mj@ucw.cz>
Mon, 15 May 2000 12:19:28 +0000 (12:19 +0000)
TODO
proto/bgp/bgp.c

diff --git a/TODO b/TODO
index d6733395b21b61a1421dc72cf3a88edad7f196a6..64a0628d8d65b462156d0a6bb20705c4c632945e 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,13 +1,10 @@
 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
 
index 98eb003e6cab0de6df362dc60cff415362e49ad6..c6dc4e907d79e18abb16822f5da5183c88c80cfb 100644 (file)
@@ -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