]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Silly bug in sh interface. Now I test ALL interfaces. :-)
authorOndrej Filip <feela@network.cz>
Fri, 2 Jun 2000 09:57:22 +0000 (09:57 +0000)
committerOndrej Filip <feela@network.cz>
Fri, 2 Jun 2000 09:57:22 +0000 (09:57 +0000)
proto/ospf/ospf.c

index 70d8985090f639385ad85139c2c5ab7ff230bd92..0ab99f9b3690e4eb6faa88cd14a8a0191bf8f955 100644 (file)
@@ -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,"");