diff options
author | David Lamparter <equinox@diac24.net> | 2021-03-22 19:41:54 +0100 |
---|---|---|
committer | David Lamparter <equinox@diac24.net> | 2021-03-22 19:41:54 +0100 |
commit | 8392606ec10309999162c9666bf5d964b85d28cc (patch) | |
tree | 1c34f704776f7f98984c9601820fac2221bcca02 /staticd/static_vrf.c | |
parent | ospf6d: kill ospf6_memory.h, use MTYPE_STATIC (diff) | |
download | frr-8392606ec10309999162c9666bf5d964b85d28cc.tar.xz frr-8392606ec10309999162c9666bf5d964b85d28cc.zip |
staticd: kill static_memory.h, use MTYPE_STATIC
This one needed a move of zebra_stable_node_cleanup() from static_vrf.c
to static_routes.c. But it seems to actually make sense there.
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'staticd/static_vrf.c')
-rw-r--r-- | staticd/static_vrf.c | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/staticd/static_vrf.c b/staticd/static_vrf.c index 2133093bb..ba1367b87 100644 --- a/staticd/static_vrf.c +++ b/staticd/static_vrf.c @@ -24,7 +24,6 @@ #include "table.h" #include "srcdest_table.h" -#include "static_memory.h" #include "static_vrf.h" #include "static_routes.h" #include "static_zebra.h" @@ -32,63 +31,6 @@ DEFINE_MTYPE_STATIC(STATIC, STATIC_RTABLE_INFO, "Static Route Table Info"); -static void zebra_stable_node_cleanup(struct route_table *table, - struct route_node *node) -{ - struct static_nexthop *nh; - struct static_path *pn; - struct static_route_info *si; - struct route_table *src_table; - struct route_node *src_node; - struct static_path *src_pn; - struct static_route_info *src_si; - - si = node->info; - - if (si) { - frr_each_safe(static_path_list, &si->path_list, pn) { - frr_each_safe(static_nexthop_list, &pn->nexthop_list, - nh) { - static_nexthop_list_del(&pn->nexthop_list, nh); - XFREE(MTYPE_STATIC_NEXTHOP, nh); - } - static_path_list_del(&si->path_list, pn); - XFREE(MTYPE_STATIC_PATH, pn); - } - - /* clean up for dst table */ - src_table = srcdest_srcnode_table(node); - if (src_table) { - /* This means the route_node is part of the top - * hierarchy and refers to a destination prefix. - */ - for (src_node = route_top(src_table); src_node; - src_node = route_next(src_node)) { - src_si = src_node->info; - - frr_each_safe(static_path_list, - &src_si->path_list, src_pn) { - frr_each_safe(static_nexthop_list, - &src_pn->nexthop_list, - nh) { - static_nexthop_list_del( - &src_pn->nexthop_list, - nh); - XFREE(MTYPE_STATIC_NEXTHOP, nh); - } - static_path_list_del(&src_si->path_list, - src_pn); - XFREE(MTYPE_STATIC_PATH, src_pn); - } - - XFREE(MTYPE_STATIC_ROUTE, src_node->info); - } - } - - XFREE(MTYPE_STATIC_ROUTE, node->info); - } -} - static struct static_vrf *static_vrf_alloc(void) { struct route_table *table; |