]> git.puffer.fish Git - mirror/frr.git/commitdiff
fixes an assert which doesnt seem to take into account that route_node_get
authorpaul <paul>
Tue, 18 Feb 2003 23:25:44 +0000 (23:25 +0000)
committerpaul <paul>
Tue, 18 Feb 2003 23:25:44 +0000 (23:25 +0000)
may return an existing node. (if the code wants a /new/ node why not use
route_node_set? if it doesnt mind - then the assert is wrong).

this bug is in zebra.org CVS. (must be an extremely rare/unlikely bug
though).

ospfd/ospf_interface.c

index f0300273274f44dc79a15e1e6c237ed045198531..d94cdb8bf9bbc719fb50b3f48e4a039f79391d10 100644 (file)
@@ -135,7 +135,10 @@ ospf_add_to_if (struct interface *ifp, struct ospf_interface *oi)
   p.prefixlen = IPV4_MAX_PREFIXLEN;
 
   rn = route_node_get (IF_OIFS (ifp), &p);
-  assert (! rn->info);
+  /* rn->info should either be NULL or equal to this oi
+   * as route_node_get may return an existing node
+   */
+  assert (! rn->info || rn->info == oi);
   rn->info = oi;
 }