mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 07:48:07 +00:00
lib: add cleanup hook to route table
This commit is contained in:
parent
785025eea0
commit
a27428eb71
@ -78,6 +78,8 @@ route_node_set (struct route_table *table, const struct prefix *prefix)
|
|||||||
static void
|
static void
|
||||||
route_node_free (struct route_table *table, struct route_node *node)
|
route_node_free (struct route_table *table, struct route_node *node)
|
||||||
{
|
{
|
||||||
|
if (table->cleanup)
|
||||||
|
table->cleanup(table, node);
|
||||||
table->delegate->destroy_node (table->delegate, table, node);
|
table->delegate->destroy_node (table->delegate, table, node);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,6 +62,7 @@ struct route_table
|
|||||||
* Delegate that performs certain functions for this table.
|
* Delegate that performs certain functions for this table.
|
||||||
*/
|
*/
|
||||||
route_table_delegate_t *delegate;
|
route_table_delegate_t *delegate;
|
||||||
|
void (*cleanup)(struct route_table *, struct route_node *);
|
||||||
|
|
||||||
unsigned long count;
|
unsigned long count;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user