[quagga-dev 7355] Re: Quagga 1.0?

Joakim Tjernlund joakim.tjernlund at transmode.se
Mon Nov 16 14:04:18 GMT 2009


Bartek Kania <mrbk at gnarf.org> wrote on 15/11/2009 22:50:08:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> >> I'll do my best to get some time to test this in the next few days.
> >> Will report back when I've done it.
> >>> Do you see any
> >>> "Can't find neighbor %s in the interface %s"
> >>> in the log?
> >> 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?

diff --git a/ospfd/ospf_neighbor.c b/ospfd/ospf_neighbor.c
index 967ca15..3879d9f 100644
--- a/ospfd/ospf_neighbor.c
+++ b/ospfd/ospf_neighbor.c
@@ -168,9 +168,13 @@ ospf_nbr_delete (struct ospf_neighbor *nbr)
        * should never have NULL info.
        */
       assert (rn->info);
-
+      if (rn->info != nbr)
+	zlog_err ("Wrong nbrs");
+
       if (rn->info)
 	{
+	  /* Free ospf_neighbor structure. */
+	  ospf_nbr_free (rn->info);
 	  rn->info = NULL;
 	  route_unlock_node (rn);
 	}
@@ -180,9 +184,6 @@ ospf_nbr_delete (struct ospf_neighbor *nbr)

       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