diff options
| author | Lou Berger <lberger@labn.net> | 2022-07-14 07:40:39 -0400 | 
|---|---|---|
| committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2022-07-16 20:53:12 +0000 | 
| commit | a543bd654f159dd23c407c4ffcdc723295c52945 (patch) | |
| tree | 27c6de35fdd4c628b06d197b98f7eae6943d80b0 | |
| parent | 2a1b7d55a24b39149b3569f306dd95010ac9e8f7 (diff) | |
ospfd: free unreachable router LSA node so that it is not left unreachable
       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)
| -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) {  | 
