summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_nssa.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2021-09-08 13:13:19 -0300
committerRenato Westphal <renato@opensourcerouting.org>2021-09-21 17:43:45 -0300
commit210429c74722d85f392cbee344ffd30bea83a004 (patch)
treeae4573f2902c25c2f9d7b72a79fc8d78dc4509b0 /ospf6d/ospf6_nssa.c
parent16727fd7eb1b99d7a3891a69b75abb8191b6887f (diff)
ospf6d: don't generate Type-7 LSA for route created by "default-information-originate"
The route created by the "default-information-originate" command isn't a regular external route. As such, an NSSA ABR shouldn't originate a corresponding Type-7 LSA for it (there's a separate configuration knob to generate Type-7 default routes). While here, fix a small issue in ospf6_asbr_redistribute_add() where routes created by "default-information-originate" were being displayed with an incorrect "unknown" type. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ospf6d/ospf6_nssa.c')
-rw-r--r--ospf6d/ospf6_nssa.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ospf6d/ospf6_nssa.c b/ospf6d/ospf6_nssa.c
index 89a72bf225..abaa16f411 100644
--- a/ospf6d/ospf6_nssa.c
+++ b/ospf6d/ospf6_nssa.c
@@ -1169,10 +1169,11 @@ static void ospf6_check_and_originate_type7_lsa(struct ospf6_area *area)
for (route = ospf6_route_head(
area->ospf6->external_table);
route; route = ospf6_route_next(route)) {
+ struct ospf6_external_info *info = route->route_option;
+
/* This means the Type-5 LSA was originated for this route */
- if (route->path.origin.id != 0)
+ if (route->path.origin.id != 0 && info->type != DEFAULT_ROUTE)
ospf6_nssa_lsa_originate(route, area);
-
}
/* Loop through the aggregation table to originate type-7 LSAs