From: Igor Ryzhov Date: Tue, 22 Jun 2021 13:15:29 +0000 (+0300) Subject: ospf6d: fix NSSA status update X-Git-Tag: base_8.1~397^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=edfab98f9e7e88a762d3e195970ec166af8c3f95;p=mirror%2Ffrr.git ospf6d: fix NSSA status update We should update ASBR status only when the NSSA status is actually changed. Signed-off-by: Igor Ryzhov --- diff --git a/ospf6d/ospf6_nssa.c b/ospf6d/ospf6_nssa.c index dfae51cec1..9f8cdf8fb7 100644 --- a/ospf6d/ospf6_nssa.c +++ b/ospf6d/ospf6_nssa.c @@ -139,6 +139,7 @@ void ospf6_abr_nssa_check_status(struct ospf6 *ospf6) struct listnode *lnode, *nnode; for (ALL_LIST_ELEMENTS(ospf6->area_list, lnode, nnode, area)) { + uint8_t old_state = area->NSSATranslatorState; if (IS_OSPF6_DEBUG_NSSA) zlog_debug("%s: checking area %s flag %x", __func__, @@ -177,16 +178,21 @@ void ospf6_abr_nssa_check_status(struct ospf6 *ospf6) } } } + + /* RFC3101, 3.1: + * All NSSA border routers must set the E-bit in the Type-1 + * router-LSAs of their directly attached non-stub areas, even + * when they are not translating. + */ + if (old_state != area->NSSATranslatorState) { + if (old_state == OSPF6_NSSA_TRANSLATE_DISABLED) + ospf6_asbr_status_update(ospf6, + ++ospf6->redist_count); + else + ospf6_asbr_status_update(ospf6, + --ospf6->redist_count); + } } - /* RFC3101, 3.1: - * All NSSA border routers must set the E-bit in the Type-1 - * router-LSAs of their directly attached non-stub areas, even - * when they are not translating. - */ - if (CHECK_FLAG(ospf6->flag, OSPF6_FLAG_ABR) && (ospf6->anyNSSA)) - ospf6_asbr_status_update(ospf6, ++ospf6->redist_count); - else - ospf6_asbr_status_update(ospf6, --ospf6->redist_count); } /* Mark the summary LSA's as unapproved, when ABR status changes.*/