summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_intra.c
diff options
context:
space:
mode:
authorKaushik <kaushiknath.null@gmail.com>2021-03-25 04:29:51 -0700
committerRafael Zalamena <rzalamena@opensourcerouting.org>2021-06-04 07:23:10 -0300
commitad500b22b5fc3bc34009b7212c7c3b2f6c4375aa (patch)
treef24f206101ffcbfc968ad97fd54a71b94c134ccb /ospf6d/ospf6_intra.c
parent10ddcc321a59de099ee357fd5cca229a8c3110bf (diff)
ospf6d: Support for nssa in ospfv3
The following is implemented. 1. Configuring area as NSSA. 2. Generating Type 7 LSA. 3. Conversion of Type 7 to Type 5 ( Default Behavior). 4. NSSA ABR selection. Reviewed-by: Rafael Zalamena <rzalamena@opensourcerouting.org> Co-authored-by: Kaushik <kaushiknath.null@gmail.com> Co-authored-by: Soman K.S <somanks@gmail.com> Signed-off-by: Kaushik <kaushiknath.null@gmail.com>
Diffstat (limited to 'ospf6d/ospf6_intra.c')
-rw-r--r--ospf6d/ospf6_intra.c34
1 files changed, 23 insertions, 11 deletions
diff --git a/ospf6d/ospf6_intra.c b/ospf6d/ospf6_intra.c
index 12d11d45c1..68ff7548cb 100644
--- a/ospf6d/ospf6_intra.c
+++ b/ospf6d/ospf6_intra.c
@@ -193,6 +193,17 @@ static void ospf6_router_lsa_options_set(struct ospf6_area *oa,
UNSET_FLAG(router_lsa->bits, OSPF6_ROUTER_BIT_E);
}
+ /* If the router is ASBR and the area-type is NSSA set the
+ * translate bit in router LSA.
+ */
+ if (IS_AREA_NSSA(oa)
+ && (ospf6_asbr_is_asbr(oa->ospf6) || IS_OSPF6_ABR(oa->ospf6))) {
+ if (oa->NSSATranslatorRole == OSPF6_NSSA_ROLE_ALWAYS)
+ SET_FLAG(router_lsa->bits, OSPF6_ROUTER_BIT_NT);
+ } else {
+ UNSET_FLAG(router_lsa->bits, OSPF6_ROUTER_BIT_NT);
+ }
+
UNSET_FLAG(router_lsa->bits, OSPF6_ROUTER_BIT_V);
UNSET_FLAG(router_lsa->bits, OSPF6_ROUTER_BIT_W);
}
@@ -2167,8 +2178,8 @@ void ospf6_intra_brouter_calculation(struct ospf6_area *oa)
if (IS_OSPF6_DEBUG_BROUTER_SPECIFIC_AREA_ID(oa->area_id) ||
IS_OSPF6_DEBUG_ROUTE(MEMORY))
- zlog_info("%s: border-router calculation for area %s", __func__,
- oa->name);
+ zlog_debug("%s: border-router calculation for area %s",
+ __func__, oa->name);
hook_add = oa->ospf6->brouter_table->hook_add;
hook_remove = oa->ospf6->brouter_table->hook_remove;
@@ -2189,8 +2200,8 @@ void ospf6_intra_brouter_calculation(struct ospf6_area *oa)
if (IS_OSPF6_DEBUG_BROUTER_SPECIFIC_ROUTER_ID(brouter_id)
|| IS_OSPF6_DEBUG_ROUTE(MEMORY)) {
- zlog_info("%p: mark as removing: area %s brouter %s",
- (void *)brouter, oa->name, brouter_name);
+ zlog_debug("%p: mark as removing: area %s brouter %s",
+ (void *)brouter, oa->name, brouter_name);
ospf6_brouter_debug_print(brouter);
}
}
@@ -2223,8 +2234,8 @@ void ospf6_intra_brouter_calculation(struct ospf6_area *oa)
if (IS_OSPF6_DEBUG_BROUTER_SPECIFIC_ROUTER_ID(brouter_id)
|| IS_OSPF6_DEBUG_ROUTE(MEMORY)) {
- zlog_info("%p: transfer: area %s brouter %s",
- (void *)brouter, oa->name, brouter_name);
+ zlog_debug("%p: transfer: area %s brouter %s",
+ (void *)brouter, oa->name, brouter_name);
ospf6_brouter_debug_print(brouter);
}
}
@@ -2297,7 +2308,7 @@ void ospf6_intra_brouter_calculation(struct ospf6_area *oa)
brouter_id)
|| IS_OSPF6_DEBUG_BROUTER_SPECIFIC_AREA_ID(
oa->area_id))
- zlog_info(
+ zlog_debug(
"%s: brouter %s disappears via area %s",
__func__, brouter_name, oa->name);
/* This is used to protect nbrouter from removed from
@@ -2325,8 +2336,9 @@ void ospf6_intra_brouter_calculation(struct ospf6_area *oa)
brouter_id)
|| IS_OSPF6_DEBUG_BROUTER_SPECIFIC_AREA_ID(
oa->area_id))
- zlog_info("brouter %s still exists via area %s",
- brouter_name, oa->name);
+ zlog_debug(
+ "brouter %s still exists via area %s",
+ brouter_name, oa->name);
/* But re-originate summaries */
ospf6_abr_originate_summary(brouter, oa->ospf6);
}
@@ -2341,8 +2353,8 @@ void ospf6_intra_brouter_calculation(struct ospf6_area *oa)
if (IS_OSPF6_DEBUG_BROUTER_SPECIFIC_AREA_ID(oa->area_id) ||
IS_OSPF6_DEBUG_ROUTE(MEMORY))
- zlog_info("%s: border-router calculation for area %s: done",
- __func__, oa->name);
+ zlog_debug("%s: border-router calculation for area %s: done",
+ __func__, oa->name);
}
static struct ospf6_lsa_handler router_handler = {