summaryrefslogtreecommitdiffstats
path: root/ospfd
diff options
context:
space:
mode:
authorckishimo <carles.kishimoto@gmail.com>2020-09-17 11:51:26 +0200
committerckishimo <carles.kishimoto@gmail.com>2020-09-17 16:44:14 +0200
commit8273ee44487f1262291b48a92a37aa3bcf4abb2a (patch)
treee208e37eefcbab04efe7e480ecbc801ee22a4d74 /ospfd
parentMerge pull request #7103 from opensourcerouting/sysrepo-fixes (diff)
downloadfrr-8273ee44487f1262291b48a92a37aa3bcf4abb2a.tar.xz
frr-8273ee44487f1262291b48a92a37aa3bcf4abb2a.zip
ospfd: do not generate type 4 LSA from NSSA ABR
In a topology like R1 -- R2 -- R5, with R2 being NSSA ABR and R5 being ASBR redistributing external routes, the ABR R2 will translate type-7 LSA into type-5 and advertise to the backbone. In the current implementation R2 is also advertising a type-4 LSA when there is no need. RFC 3101: "...NSSA's border routers never originate Type-4 summary-LSAs for the NSSA's AS boundary routers, since Type-7 AS-external-LSAs are never flooded beyond the NSSA's border..." With this PR a type-4 LSA will not be advertised Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
Diffstat (limited to 'ospfd')
-rw-r--r--ospfd/ospf_abr.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/ospfd/ospf_abr.c b/ospfd/ospf_abr.c
index f6c050499..40a1ed3a8 100644
--- a/ospfd/ospf_abr.c
+++ b/ospfd/ospf_abr.c
@@ -1153,6 +1153,15 @@ static void ospf_abr_announce_rtr(struct ospf *ospf, struct prefix_ipv4 *p,
if (ospf_abr_nexthops_belong_to_area(or, area))
continue;
+ /* RFC3101: Do not generate ASBR type 4 LSA if NSSA ABR */
+ if (or->u.std.external_routing == OSPF_AREA_NSSA) {
+ if (IS_DEBUG_OSPF_EVENT)
+ zlog_debug(
+ "ospf_abr_announce_rtr(): do not generate LSA Type-4 %s from NSSA",
+ inet_ntoa(p->prefix));
+ continue;
+ }
+
if (area->external_routing != OSPF_AREA_DEFAULT) {
if (IS_DEBUG_OSPF_EVENT)
zlog_debug(