]> git.puffer.fish Git - matthieu/frr.git/commitdiff
ospfd: free unreachable router LSA node so that it is not left unreachable
authorLou Berger <lberger@labn.net>
Thu, 14 Jul 2022 11:40:39 +0000 (07:40 -0400)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Sat, 16 Jul 2022 20:53:00 +0000 (20:53 +0000)
       allows for an LSA to be unreachable via one link and reachable via another

Signed-off-by: Lou Berger <lberger@labn.net>
(cherry picked from commit b976af1b093faf2723257a185070c48cb5de6813)

ospfd/ospf_spf.c

index 8b4d55984c8044d2b2a6873d8bd1d400643e1a91..a9bea3755ff44209bb2761a58896d7e8d1312ebb 100644 (file)
@@ -1463,8 +1463,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) {