summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_abr.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2021-08-24 22:35:21 +0200
committerRenato Westphal <renato@opensourcerouting.org>2021-09-07 16:43:35 +0200
commit8a60820f70cb9b218fdb87100caaca45c42f1a36 (patch)
tree6e2c445a11803dcb07968c0b3df4b67f6ab827ac /ospf6d/ospf6_abr.c
parentMerge pull request #9577 from slankdev/slankdev-topotest-nsenter (diff)
downloadfrr-8a60820f70cb9b218fdb87100caaca45c42f1a36.tar.xz
frr-8a60820f70cb9b218fdb87100caaca45c42f1a36.zip
ospf6d: add support for NSSA totally stub areas
Add a knob to turn a NSSA area into a totally stub area. In this configuration a Type-3 default summary route is generated by default. Syntax: `area A.B.C.D nssa no-summary`. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ospf6d/ospf6_abr.c')
-rw-r--r--ospf6d/ospf6_abr.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/ospf6d/ospf6_abr.c b/ospf6d/ospf6_abr.c
index 650262f1a..aa8547567 100644
--- a/ospf6d/ospf6_abr.c
+++ b/ospf6d/ospf6_abr.c
@@ -748,7 +748,15 @@ void ospf6_abr_defaults_to_stub(struct ospf6 *o)
def->path.cost = metric_value(o, type, 0);
for (ALL_LIST_ELEMENTS(o->area_list, node, nnode, oa)) {
- if (!IS_AREA_STUB(oa)) {
+ if (IS_AREA_STUB(oa) || (IS_AREA_NSSA(oa) && oa->no_summary)) {
+ /* announce defaults to stubby areas */
+ if (IS_OSPF6_DEBUG_ABR)
+ zlog_debug(
+ "Announcing default route into stubby area %s",
+ oa->name);
+ UNSET_FLAG(def->flag, OSPF6_ROUTE_REMOVE);
+ ospf6_abr_originate_summary_to_area(def, oa);
+ } else {
/* withdraw defaults when an area switches from stub to
* non-stub */
route = ospf6_route_lookup(&def->prefix,
@@ -762,14 +770,6 @@ void ospf6_abr_defaults_to_stub(struct ospf6 *o)
SET_FLAG(def->flag, OSPF6_ROUTE_REMOVE);
ospf6_abr_originate_summary_to_area(def, oa);
}
- } else {
- /* announce defaults to stubby areas */
- if (IS_OSPF6_DEBUG_ABR)
- zlog_debug(
- "Announcing default route into stubby area %s",
- oa->name);
- UNSET_FLAG(def->flag, OSPF6_ROUTE_REMOVE);
- ospf6_abr_originate_summary_to_area(def, oa);
}
}
ospf6_route_delete(def);