#include "ospf6_zebra.h"
DEFINE_MTYPE_STATIC(OSPF6D, OSPF6_ROUTE, "OSPF6 route");
+DEFINE_MTYPE_STATIC(OSPF6D, OSPF6_ROUTE_TABLE, "OSPF6 route table");
DEFINE_MTYPE_STATIC(OSPF6D, OSPF6_NEXTHOP, "OSPF6 nexthop");
DEFINE_MTYPE_STATIC(OSPF6D, OSPF6_PATH, "OSPF6 Path");
if (node->info == old) {
node->info = route;
SET_FLAG(route->flag, OSPF6_ROUTE_BEST);
+ if (IS_OSPF6_DEBUG_ROUTE(MEMORY))
+ zlog_debug("%s: replace old route %s",
+ __func__, buf);
}
if (old->prev)
UNSET_FLAG(next->flag, OSPF6_ROUTE_BEST);
SET_FLAG(route->flag, OSPF6_ROUTE_BEST);
if (IS_OSPF6_DEBUG_ROUTE(MEMORY))
- zlog_info(
+ zlog_debug(
"%s %p: route add %p cost %u: replacing previous best: %p cost %u",
ospf6_route_table_name(table),
(void *)table, (void *)route,
- route->path.cost,
- (void *)next, next->path.cost);
+ route->path.cost, (void *)next,
+ next->path.cost);
}
route->installed = now;
if (route->next && route->next->rnode == node) {
node->info = route->next;
SET_FLAG(route->next->flag, OSPF6_ROUTE_BEST);
+ if (IS_OSPF6_DEBUG_ROUTE(MEMORY))
+ zlog_debug("%s: remove route %s", __func__,
+ buf);
} else {
node->info = NULL;
route->rnode = NULL;
struct ospf6_route_table *ospf6_route_table_create(int s, int t)
{
struct ospf6_route_table *new;
- new = XCALLOC(MTYPE_OSPF6_ROUTE, sizeof(struct ospf6_route_table));
+ new = XCALLOC(MTYPE_OSPF6_ROUTE_TABLE,
+ sizeof(struct ospf6_route_table));
new->table = route_table_init();
new->scope_type = s;
new->table_type = t;
ospf6_route_remove_all(table);
bf_free(table->idspace);
route_table_finish(table->table);
- XFREE(MTYPE_OSPF6_ROUTE, table);
+ XFREE(MTYPE_OSPF6_ROUTE_TABLE, table);
}