]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospf6d: always remove the result of a previous SPF calculation
authorTom Goff <thomas.goff@boeing.com>
Wed, 14 Dec 2011 10:11:29 +0000 (14:11 +0400)
committerDenis Ovsienko <infrastation@yandex.ru>
Wed, 14 Dec 2011 10:11:29 +0000 (14:11 +0400)
This is needed to avoid stale routes in some cases; the regression was
introduced by commit 1d19234e79c77a7d55194b513f2a77c6a691bc2c.

* ospf6_spf.c: (ospf6_spf_calculation) Call ospf6_spf_table_finish()
  before possibly returning if no router-LSA is found for the root of
  the SPF tree.

ospf6d/ospf6_spf.c

index beb6d7f7ee17d84e82bf7e5c454d5cf91f000015..a4a5b7218428d9903d169c0fe0fbebf3cf7e4c5f 100644 (file)
@@ -391,6 +391,8 @@ ospf6_spf_calculation (u_int32_t router_id,
   caddr_t lsdesc;
   struct ospf6_lsa *lsa;
 
+  ospf6_spf_table_finish (result_table);
+
   /* Install the calculating router itself as the root of the SPF tree */
   /* construct root vertex */
   lsa = ospf6_lsdb_lookup (htons (OSPF6_LSTYPE_ROUTER), htonl (0),
@@ -402,8 +404,6 @@ ospf6_spf_calculation (u_int32_t router_id,
   candidate_list = pqueue_create ();
   candidate_list->cmp = ospf6_vertex_cmp;
 
-  ospf6_spf_table_finish (result_table);
-
   root = ospf6_vertex_create (lsa);
   root->area = oa;
   root->cost = 0;