summaryrefslogtreecommitdiff
path: root/lib/table.c
diff options
context:
space:
mode:
authorChristian Franke <chris@opensourcerouting.org>2017-01-18 23:46:43 +0100
committerChristian Franke <chris@opensourcerouting.org>2017-01-30 13:54:46 +0100
commita27428eb7164b47b6b227e1be16a87d6e84c551b (patch)
treed23c064efc947d27b6f21e97d56a5b91fccb0693 /lib/table.c
parent785025eea0f7d1dffb1a097129f57cfb15600ae7 (diff)
lib: add cleanup hook to route table
Diffstat (limited to 'lib/table.c')
-rw-r--r--lib/table.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/table.c b/lib/table.c
index 075c5584a8..7f789dd3cd 100644
--- a/lib/table.c
+++ b/lib/table.c
@@ -78,6 +78,8 @@ route_node_set (struct route_table *table, const struct prefix *prefix)
static void
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);
}