diff options
author | Igor Ryzhov <iryzhov@nfware.com> | 2021-06-22 15:15:29 +0200 |
---|---|---|
committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-06-23 00:05:07 +0200 |
commit | edfab98f9e7e88a762d3e195970ec166af8c3f95 (patch) | |
tree | c125edecb97be2f9fd728f3c312ffc2ea4f8064a /ospf6d | |
parent | ospf6d: fix redistribute configuration (diff) | |
download | frr-edfab98f9e7e88a762d3e195970ec166af8c3f95.tar.xz frr-edfab98f9e7e88a762d3e195970ec166af8c3f95.zip |
ospf6d: fix NSSA status update
We should update ASBR status only when the NSSA status is actually changed.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'ospf6d')
-rw-r--r-- | ospf6d/ospf6_nssa.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/ospf6d/ospf6_nssa.c b/ospf6d/ospf6_nssa.c index dfae51cec..9f8cdf8fb 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.*/ |