diff options
author | lynne <lynne@voltanet.io> | 2021-03-25 16:58:45 +0100 |
---|---|---|
committer | lynne <lynne@voltanet.io> | 2021-05-04 21:28:56 +0200 |
commit | f6c5f2e0c3c46400fa95b401add386beab1e5118 (patch) | |
tree | ee58ef223908209c8bb78265ae6f0ade45361c34 /ospf6d/ospf6_abr.c | |
parent | Merge pull request #8499 from donaldsharp/ospf_what (diff) | |
download | frr-f6c5f2e0c3c46400fa95b401add386beab1e5118.tar.xz frr-f6c5f2e0c3c46400fa95b401add386beab1e5118.zip |
ospf6d: Fix when an "export-list" or "filter-list out" is applied.
When an "export-filter" or "filter-list out" was configured on an area the
filter was not applied to existing database. The user would either have
to restart the neighboring router in the other area or issue a "clear ipv6
ospf6 interface" to cause the neighbor router to resend it's LSAs. The
new filter would then be applied to these LSAs and permit or deny summary
LSAs from being added/removed from the database. The code now applies the
filters to the existing database without user needing to take any action
to clear ospfv3 adjacencies.
The second part of the problem was if a rule changed the updated filter was
not applied. The code has been modifed to now process the rule update and
reapply the filter.
Signed-off-by: Lynne Morrison <lynne@voltanet.io>
Diffstat (limited to 'ospf6d/ospf6_abr.c')
-rw-r--r-- | ospf6d/ospf6_abr.c | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/ospf6d/ospf6_abr.c b/ospf6d/ospf6_abr.c index 27d4f0755..286e64278 100644 --- a/ospf6d/ospf6_abr.c +++ b/ospf6d/ospf6_abr.c @@ -389,6 +389,8 @@ int ospf6_abr_originate_summary_to_area(struct ospf6_route *route, zlog_debug( "prefix %pFX was denied by export list", &route->prefix); + ospf6_abr_delete_route(route, summary, + summary_table, old); return 0; } } @@ -401,6 +403,9 @@ int ospf6_abr_originate_summary_to_area(struct ospf6_route *route, zlog_debug( "prefix %pFX was denied by filter-list out", &route->prefix); + ospf6_abr_delete_route(route, summary, summary_table, + old); + return 0; } @@ -1075,7 +1080,8 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa) == FILTER_DENY) { if (is_debug) zlog_debug( - "Prefix was denied by import-list"); + "Prefix %pFX was denied by import-list", + &prefix); if (old) ospf6_route_remove(old, table); return; @@ -1087,7 +1093,9 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa) if (prefix_list_apply(PREFIX_LIST_IN(oa), &prefix) != PREFIX_PERMIT) { if (is_debug) - zlog_debug("Prefix was denied by prefix-list"); + zlog_debug( + "Prefix %pFX was denied by prefix-list in", + &prefix); if (old) ospf6_route_remove(old, table); return; @@ -1287,6 +1295,21 @@ void ospf6_abr_reimport(struct ospf6_area *oa) ospf6_abr_examin_summary(lsa, oa); } +/* export filter removed so determine if we should reoriginate summary LSAs */ +void ospf6_abr_reexport(struct ospf6_area *oa) +{ + struct ospf6_route *route; + + /* if not a ABR return success */ + if (!ospf6_is_router_abr(oa->ospf6)) + return; + + /* Redo summaries if required */ + for (route = ospf6_route_head(oa->ospf6->route_table); route; + route = ospf6_route_next(route)) + ospf6_abr_originate_summary_to_area(route, oa); +} + void ospf6_abr_prefix_resummarize(struct ospf6 *o) { struct ospf6_route *route; |