[quagga-dev 4199] Re: possible ospfd bug: in state ExStart with routers that are neither DR nor BDR

Andrew J. Schorr aschorr at telemetry-investments.com
Fri Jun 30 14:15:20 BST 2006


On Thu, Jun 29, 2006 at 01:06:01PM -0400, Andrew J. Schorr wrote:
> ti77# show ip ospf neigh 192.168.21.35
>  Neighbor 192.168.21.35, interface address 192.168.169.35
>     In the area 0.0.0.0 via interface eth0.169
>     Neighbor priority is 3, State is ExStart, 2 state changes
>     DR is 192.168.169.79, BDR is 192.168.169.78
>     Options 2 *|-|-|-|-|-|E|*
>     Dead timer due in 0.921s
>     Database Summary List 0
>     Link State Request List 0
>     Link State Retransmission List 0
>     Thread Inactivity Timer on
>     Thread Database Description Retransmision on
>     Thread Link State Request Retransmission off
>     Thread Link State Update Retransmission off
> 
> But I'm a bit confused as to why it shows the neighbor information
> only for the 192.168.169 prefix and not the 192.168.170 prefix as
> well.  How is "show ip ospf neighbor <ip addr>" supposed to handle
> cases where the same neighbor is present more than once?  It seems
> to key off the neighbor ID, not the interface address, but then shouldn't
> it show both entries?  The code seems to be here:
> 
>   for (ALL_LIST_ELEMENTS_RO (ospf->oiflist, node, oi))
>     if ((nbr = ospf_nbr_lookup_by_routerid (oi->nbrs, &router_id)))
>       {
>         show_ip_ospf_neighbor_detail_sub (vty, oi, nbr);
>         return CMD_SUCCESS;
>       }
> 
> Should that "return CMD_SUCCESS" be removed so it can match other instances?

So does the attached patch make sense?  Shouldn't we show the neighbor
info for all matching interface addresses?

Regards,
Andy
-------------- next part --------------
Index: ospfd/ospf_vty.c
===================================================================
RCS file: /var/cvsroot/quagga/ospfd/ospf_vty.c,v
retrieving revision 1.57
diff -b -u -p -r1.57 ospf_vty.c
--- ospfd/ospf_vty.c	29 Jun 2006 20:20:52 -0000	1.57
+++ ospfd/ospf_vty.c	30 Jun 2006 12:14:54 -0000
@@ -3222,12 +3222,8 @@ DEFUN (show_ip_ospf_neighbor_id,
 
   for (ALL_LIST_ELEMENTS_RO (ospf->oiflist, node, oi))
     if ((nbr = ospf_nbr_lookup_by_routerid (oi->nbrs, &router_id)))
-      {
         show_ip_ospf_neighbor_detail_sub (vty, oi, nbr);
-        return CMD_SUCCESS;
-      }
 
-  /* Nothing to show. */
   return CMD_SUCCESS;
 }
 


More information about the Quagga-dev mailing list