]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospfd: free unreachable router LSA node so that it is not left unreachable 11604/head
authorLou Berger <lberger@labn.net>
Thu, 14 Jul 2022 11:40:39 +0000 (07:40 -0400)
committerLou Berger <lberger@labn.net>
Sat, 16 Jul 2022 14:28:42 +0000 (10:28 -0400)
       allows for an LSA to be unreachable via one link and reachable via another

Signed-off-by: Lou Berger <lberger@labn.net>
ospfd/ospf_spf.c

index 44549b980cacc92227bd9f6fa2fb16f5fc719d0f..74a567427350f3e1469f9627c2fcc98ed8f0cc5b 100644 (file)
@@ -1464,8 +1464,13 @@ static void ospf_spf_next(struct vertex *v, struct ospf_area *area,
                        if (ospf_nexthop_calculation(area, v, w, l, distance,
                                                     lsa_pos))
                                vertex_pqueue_add(candidate, w);
-                       else if (IS_DEBUG_OSPF_EVENT)
-                               zlog_debug("Nexthop Calc failed");
+                       else {
+                               listnode_delete(area->spf_vertex_list, w);
+                               ospf_vertex_free(w);
+                               w_lsa->stat = LSA_SPF_NOT_EXPLORED;
+                               if (IS_DEBUG_OSPF_EVENT)
+                                       zlog_debug("Nexthop Calc failed");
+                       }
                } else if (w_lsa->stat != LSA_SPF_IN_SPFTREE) {
                        w = w_lsa->stat;
                        if (w->distance < distance) {