summaryrefslogtreecommitdiffstats
path: root/proto
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2000-06-02 11:57:22 +0200
committerOndrej Filip <feela@network.cz>2000-06-02 11:57:22 +0200
commita489f0ce8ba44df0894a2bd102660fed1bed5ac6 (patch)
tree714ca747a55ca6e5621ea5841cf34c3df0637670 /proto
parent489f800b45d6d2d1a1fc9b371a015563cea9722d (diff)
downloadbird-a489f0ce8ba44df0894a2bd102660fed1bed5ac6.tar
bird-a489f0ce8ba44df0894a2bd102660fed1bed5ac6.zip
Silly bug in sh interface. Now I test ALL interfaces. :-)
Diffstat (limited to 'proto')
-rw-r--r--proto/ospf/ospf.c35
1 files changed, 21 insertions, 14 deletions
diff --git a/proto/ospf/ospf.c b/proto/ospf/ospf.c
index 70d8985..0ab99f9 100644
--- a/proto/ospf/ospf.c
+++ b/proto/ospf/ospf.c
@@ -328,28 +328,31 @@ ospf_sh_neigh(struct proto *p, char *iff)
{
WALK_LIST(f, po->iface_list)
{
- if(strcmp(iff,f->iface->name)==0) ifa=f;
- break;
+ if(strcmp(iff,f->iface->name)==0)
+ {
+ ifa=f;
+ break;
+ }
}
if(ifa==NULL)
{
cli_msg(0,"");
return;
}
+ cli_msg(-1013,"%s:", p->name);
+ cli_msg(-1013,"%-12s\t%3s\t%-15s\t%-5s\t%-12s\t%-10s","Router ID","Pri",
+ " State", "DTime", "Router IP", "Interface");
+ WALK_LIST(n, ifa->neigh_list) ospf_sh_neigh_info(n);
+ cli_msg(0,"");
+ }
+
cli_msg(-1013,"%s:", p->name);
cli_msg(-1013,"%-12s\t%3s\t%-15s\t%-5s\t%-12s\t%-10s","Router ID","Pri",
" State", "DTime", "Router IP", "Interface");
- WALK_LIST(n, ifa->neigh_list) ospf_sh_neigh_info(n);
+ WALK_LIST(ifa,po->iface_list)
+ WALK_LIST(n, ifa->neigh_list)
+ ospf_sh_neigh_info(n);
cli_msg(0,"");
- }
-
- cli_msg(-1013,"%s:", p->name);
- cli_msg(-1013,"%-12s\t%3s\t%-15s\t%-5s\t%-12s\t%-10s","Router ID","Pri",
- " State", "DTime", "Router IP", "Interface");
- WALK_LIST(ifa,po->iface_list)
- WALK_LIST(n, ifa->neigh_list)
- ospf_sh_neigh_info(n);
- cli_msg(0,"");
}
void
@@ -405,9 +408,13 @@ ospf_sh_iface(struct proto *p, char *iff)
{
WALK_LIST(f, po->iface_list)
{
- if(strcmp(iff,f->iface->name)==0) ifa=f;
- break;
+ if(strcmp(iff,f->iface->name)==0)
+ {
+ ifa=f;
+ break;
+ }
}
+
if(ifa==NULL)
{
cli_msg(0,"");