summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_nssa.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2021-08-16 21:35:27 -0300
committerRenato Westphal <renato@opensourcerouting.org>2021-08-24 00:24:41 -0300
commitd36a6a19d996240f8b8c2a960b181fa14522dc09 (patch)
tree80747da011ee8211482a860e112733eefa5870d4 /ospf6d/ospf6_nssa.c
parent6b7388555605024fd6594cc998badb6bcd7069f5 (diff)
ospf6d: always unset the E-bit on NSSA ABRs
RFC 3101 - Section 2.1 says: "(..) Interfaces associated with an NSSA will not send or receive Type-5 LSAs on that interface but may send and receive Type-7 LSAs. Therefore, if the N-bit is set in the options field, the E-bit must be clear." If the E-bit isn't cleared on an NSSA ABR, that will cause hello packets to be dropped (due to parameters mismatch), which will prevent the ABR from forming adjacencies with others routers in the NSSA area. This problem didn't affect the existing NSSA topotest by chance of luck. In that topotest, in the NSSA ABR, the NSSA area is configured before any interface is associated to it. That caused ospf6_check_and_set_router_abr() to return false, leading to the unsetting of the E-bit. With this fix, the order in which areas/interfaces are configured shouldn't matter because the E-bit will always be unset on NSSA areas. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ospf6d/ospf6_nssa.c')
-rw-r--r--ospf6d/ospf6_nssa.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/ospf6d/ospf6_nssa.c b/ospf6d/ospf6_nssa.c
index 470a5b1338..636a77c39d 100644
--- a/ospf6d/ospf6_nssa.c
+++ b/ospf6d/ospf6_nssa.c
@@ -1203,8 +1203,7 @@ static void ospf6_check_and_originate_type7_lsa(struct ospf6_area *area)
static void ospf6_area_nssa_update(struct ospf6_area *area)
{
if (IS_AREA_NSSA(area)) {
- if (!ospf6_check_and_set_router_abr(area->ospf6))
- OSPF6_OPT_CLEAR(area->options, OSPF6_OPT_E);
+ OSPF6_OPT_CLEAR(area->options, OSPF6_OPT_E);
area->ospf6->anyNSSA++;
OSPF6_OPT_SET(area->options, OSPF6_OPT_N);
area->NSSATranslatorRole = OSPF6_NSSA_ROLE_CANDIDATE;
@@ -1212,8 +1211,7 @@ static void ospf6_area_nssa_update(struct ospf6_area *area)
if (IS_OSPF6_DEBUG_ORIGINATE(ROUTER))
zlog_debug("Normal area for if %s", area->name);
OSPF6_OPT_CLEAR(area->options, OSPF6_OPT_N);
- if (ospf6_check_and_set_router_abr(area->ospf6))
- OSPF6_OPT_SET(area->options, OSPF6_OPT_E);
+ OSPF6_OPT_SET(area->options, OSPF6_OPT_E);
area->ospf6->anyNSSA--;
area->NSSATranslatorState = OSPF6_NSSA_TRANSLATE_DISABLED;
}