[quagga-dev 7359] Re: Quagga 1.0?

Joakim Tjernlund joakim.tjernlund at transmode.se
Mon Nov 16 19:22:16 GMT 2009


Bartek Kania <mrbk at gnarf.org> wrote on 16/11/2009 19:12:52:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> On Mon, 16 Nov 2009, Joakim Tjernlund wrote:
> > Bartek Kania <mrbk at gnarf.org> wrote on 15/11/2009 22:50:08:
> >>>> No such messages as far as I can see.
> >>> Are your routerID the same as one of your IP addresses?
> >>> If so, can you try with a unique routerID(== not an used IP address)?
> >> The router id is the same as an IP address yes.
> >> I'll do a test with another IP as soon as I can and report back.
> > I have been staring at the code for quite some time now and I can't see anything wrong
> > The best I can do is the below patch. Do you notice any difference?
> > Does Quagga leak memory now?
>
> Hi!
> Unfortunately it still crashes.
> And it logs the error you added. I've attached the log as
> log.txt. IPnumbers obscured tho.
> I've also attached my config and the full output from valgrind.

So some more debug:

diff --git a/ospfd/ospf_neighbor.c b/ospfd/ospf_neighbor.c
index 967ca15..2fc9cf3 100644
--- a/ospfd/ospf_neighbor.c
+++ b/ospfd/ospf_neighbor.c
@@ -168,9 +168,15 @@ ospf_nbr_delete (struct ospf_neighbor *nbr)
        * should never have NULL info.
        */
       assert (rn->info);
-
+      if (rn->lock != 2)
+	zlog_err ("rn->lock! %d", rn->lock);
+      if (rn->info != nbr)
+	zlog_err ("Wrong nbrs: %p, %p", rn->info, nbr);
+
       if (rn->info)
 	{
+	  /* Free ospf_neighbor structure. */
+	  ospf_nbr_free (nbr);
 	  rn->info = NULL;
 	  route_unlock_node (rn);
 	}
@@ -178,11 +184,9 @@ ospf_nbr_delete (struct ospf_neighbor *nbr)
 	zlog_info ("Can't find neighbor %s in the interface %s",
 		   inet_ntoa (nbr->src), IF_NAME (oi));

-      route_unlock_node (rn);
+      if (rn->lock == 1)
+	route_unlock_node (rn);
     }
-
-  /* Free ospf_neighbor structure. */
-  ospf_nbr_free (nbr);
 }

 /* Check myself is in the neighbor list. */




More information about the Quagga-dev mailing list