From c8c1a240ab9653d74b3af009f850e150909f784e Mon Sep 17 00:00:00 2001 From: rgirada Date: Mon, 20 Mar 2023 11:22:26 +0000 Subject: [PATCH] ospfd: Fixing Summary origination after range configuration Description: After area range config, summary lsas are aggerated to configured route but later it was being flushed instead of the actual summary lsa. This was seen when prefix-id of the aggregated route is same as one of the actual summary route. Here, aggregated summary lsa need to be returned to set the flag SUMMARY_APPROVE after originating aggregated summary lsa but its not. Which is being cleaned up as part of unapproved summary cleanup. Corrected this now. Issue: #13028 Signed-off-by: Rajesh Girada --- ospfd/ospf_lsa.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c index f41e303efb..5c3f184c5d 100644 --- a/ospfd/ospf_lsa.c +++ b/ospfd/ospf_lsa.c @@ -1290,7 +1290,7 @@ static struct ospf_lsa *ospf_handle_summarylsa_lsId_chg(struct ospf_area *area, struct in_addr old_id) { struct ospf_lsa *lsa = NULL; - struct ospf_lsa *new = NULL; + struct ospf_lsa *summary_lsa = NULL; struct summary_lsa *sl = NULL; struct ospf_area *old_area = NULL; struct ospf *ospf = area->ospf; @@ -1328,19 +1328,19 @@ static struct ospf_lsa *ospf_handle_summarylsa_lsId_chg(struct ospf_area *area, if (type == OSPF_SUMMARY_LSA) { /*Refresh the LSA with new LSA*/ - ospf_summary_lsa_refresh(ospf, lsa); + summary_lsa = ospf_summary_lsa_refresh(ospf, lsa); - new = ospf_summary_lsa_prepare_and_flood( - &old_prefix, old_metric, old_area, old_id); + ospf_summary_lsa_prepare_and_flood(&old_prefix, old_metric, + old_area, old_id); } else { /*Refresh the LSA with new LSA*/ - ospf_summary_asbr_lsa_refresh(ospf, lsa); + summary_lsa = ospf_summary_asbr_lsa_refresh(ospf, lsa); - new = ospf_asbr_summary_lsa_prepare_and_flood( - &old_prefix, old_metric, old_area, old_id); + ospf_asbr_summary_lsa_prepare_and_flood(&old_prefix, old_metric, + old_area, old_id); } - return new; + return summary_lsa; } /* Originate Summary-LSA. */