summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2000-06-02 12:21:02 +0200
committerOndrej Filip <feela@network.cz>2000-06-02 12:21:02 +0200
commit3488634cba08aeda19a733f7c76aef7a54a4e0ec (patch)
tree66f988ca5d56a9a1bcd5cfc0ca31933e2aab4062
parenta489f0ce8ba44df0894a2bd102660fed1bed5ac6 (diff)
downloadbird-3488634cba08aeda19a733f7c76aef7a54a4e0ec.tar
bird-3488634cba08aeda19a733f7c76aef7a54a4e0ec.zip
Handle "show ospf *" even if protocol is down.
-rw-r--r--proto/ospf/ospf.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/proto/ospf/ospf.c b/proto/ospf/ospf.c
index 0ab99f9..a0ec48f 100644
--- a/proto/ospf/ospf.c
+++ b/proto/ospf/ospf.c
@@ -323,6 +323,13 @@ ospf_sh_neigh(struct proto *p, char *iff)
struct ospf_iface *ifa=NULL,*f;
struct ospf_neighbor *n;
struct proto_ospf *po=(struct proto_ospf *)p;
+
+ if(p->proto_state != PS_UP)
+ {
+ cli_msg(-1013,"%s: is not up", p->name);
+ cli_msg(0,"");
+ return;
+ }
if(iff!=NULL)
{
@@ -366,6 +373,13 @@ ospf_sh(struct proto *p)
int nno;
int adjno;
+ if(p->proto_state != PS_UP)
+ {
+ cli_msg(-1014,"%s: is not up", p->name);
+ cli_msg(0,"");
+ return;
+ }
+
cli_msg(-1014,"%s:", p->name);
cli_msg(-1014,"Number of areas: %u", po->areano);
@@ -404,6 +418,13 @@ ospf_sh_iface(struct proto *p, char *iff)
int nno;
int adjno;
+ if(p->proto_state != PS_UP)
+ {
+ cli_msg(-1015,"%s: is not up", p->name);
+ cli_msg(0,"");
+ return;
+ }
+
if(iff!=NULL)
{
WALK_LIST(f, po->iface_list)