diff options
| author | Jafar Al-Gharaibeh <jafar@atcorp.com> | 2022-07-16 15:52:06 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-16 15:52:06 -0500 |
| commit | a3fef414b6236e89d3fa02b444f16c9901d81021 (patch) | |
| tree | 501e7961eb96208d98d9f2d7ef06743a62bcbe35 | |
| parent | 4b0c476eeba49829e4b7b2408589449d9162d47d (diff) | |
| parent | b976af1b093faf2723257a185070c48cb5de6813 (diff) | |
Merge pull request #11604 from LabNConsulting/working/lb/ospf-parallel-nets
ospfd: free unreachable router LSA node so that it is not left unreachable
| -rw-r--r-- | ospfd/ospf_spf.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ospfd/ospf_spf.c b/ospfd/ospf_spf.c index 44549b980c..74a5674273 100644 --- a/ospfd/ospf_spf.c +++ b/ospfd/ospf_spf.c @@ -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) { |
