diff options
Diffstat (limited to 'ospf6d/ospf6_top.c')
| -rw-r--r-- | ospf6d/ospf6_top.c | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c index cbfa8ba3d5..6cd214f595 100644 --- a/ospf6d/ospf6_top.c +++ b/ospf6d/ospf6_top.c @@ -149,24 +149,27 @@ static void ospf6_top_lsdb_hook_remove(struct ospf6_lsa *lsa) } } -static void ospf6_top_route_hook_add(struct ospf6_route *route, - struct ospf6 *ospf6) +static void ospf6_top_route_hook_add(struct ospf6_route *route) { + struct ospf6 *ospf6 = route->table->scope; + ospf6_abr_originate_summary(route, ospf6); ospf6_zebra_route_update_add(route, ospf6); } -static void ospf6_top_route_hook_remove(struct ospf6_route *route, - struct ospf6 *ospf6) +static void ospf6_top_route_hook_remove(struct ospf6_route *route) { + struct ospf6 *ospf6 = route->table->scope; + route->flag |= OSPF6_ROUTE_REMOVE; ospf6_abr_originate_summary(route, ospf6); ospf6_zebra_route_update_remove(route, ospf6); } -static void ospf6_top_brouter_hook_add(struct ospf6_route *route, - struct ospf6 *ospf6) +static void ospf6_top_brouter_hook_add(struct ospf6_route *route) { + struct ospf6 *ospf6 = route->table->scope; + if (IS_OSPF6_DEBUG_EXAMIN(AS_EXTERNAL) || IS_OSPF6_DEBUG_BROUTER) { uint32_t brouter_id; @@ -186,9 +189,10 @@ static void ospf6_top_brouter_hook_add(struct ospf6_route *route, ospf6_abr_originate_summary(route, ospf6); } -static void ospf6_top_brouter_hook_remove(struct ospf6_route *route, - struct ospf6 *ospf6) +static void ospf6_top_brouter_hook_remove(struct ospf6_route *route) { + struct ospf6 *ospf6 = route->table->scope; + if (IS_OSPF6_DEBUG_EXAMIN(AS_EXTERNAL) || IS_OSPF6_DEBUG_BROUTER) { uint32_t brouter_id; @@ -310,10 +314,10 @@ void ospf6_delete(struct ospf6 *o) ospf6_lsdb_delete(o->lsdb); ospf6_lsdb_delete(o->lsdb_self); - ospf6_route_table_delete(o->route_table, o); - ospf6_route_table_delete(o->brouter_table, o); + ospf6_route_table_delete(o->route_table); + ospf6_route_table_delete(o->brouter_table); - ospf6_route_table_delete(o->external_table, o); + ospf6_route_table_delete(o->external_table); route_table_finish(o->external_id_table); ospf6_distance_reset(o); @@ -338,8 +342,8 @@ static void ospf6_disable(struct ospf6 *o) ospf6_asbr_redistribute_reset(o->vrf_id); ospf6_lsdb_remove_all(o->lsdb); - ospf6_route_remove_all(o->route_table, o); - ospf6_route_remove_all(o->brouter_table, o); + ospf6_route_remove_all(o->route_table); + ospf6_route_remove_all(o->brouter_table); THREAD_OFF(o->maxage_remover); THREAD_OFF(o->t_spf_calc); |
