mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 16:57:44 +00:00
zebra: kill zebra_memory.h, use MTYPE_STATIC
This one also needed a bit of shuffling around, but MTYPE_RE is the only one left used across file boundaries now. Signed-off-by: David Lamparter <equinox@diac24.net>
This commit is contained in:
parent
8392606ec1
commit
224ccf29d9
@ -29,7 +29,6 @@
|
||||
#include "table.h"
|
||||
#include "log.h"
|
||||
#include "memory.h"
|
||||
#include "zebra_memory.h"
|
||||
|
||||
#include "vty.h"
|
||||
#include "zebra/debug.h"
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include "ioctl.h"
|
||||
#include "connected.h"
|
||||
#include "memory.h"
|
||||
#include "zebra_memory.h"
|
||||
#include "log.h"
|
||||
#include "vrf.h"
|
||||
#include "vty.h"
|
||||
|
@ -44,7 +44,6 @@
|
||||
#include "connected.h"
|
||||
#include "table.h"
|
||||
#include "memory.h"
|
||||
#include "zebra_memory.h"
|
||||
#include "rib.h"
|
||||
#include "thread.h"
|
||||
#include "privs.h"
|
||||
|
@ -28,7 +28,6 @@
|
||||
#include "prefix.h"
|
||||
#include "connected.h"
|
||||
#include "memory.h"
|
||||
#include "zebra_memory.h"
|
||||
#include "ioctl.h"
|
||||
#include "log.h"
|
||||
#include "interface.h"
|
||||
|
@ -28,7 +28,6 @@
|
||||
#include "prefix.h"
|
||||
#include "command.h"
|
||||
#include "memory.h"
|
||||
#include "zebra_memory.h"
|
||||
#include "ioctl.h"
|
||||
#include "connected.h"
|
||||
#include "log.h"
|
||||
|
@ -34,7 +34,6 @@
|
||||
#include "prefix.h"
|
||||
#include "command.h"
|
||||
#include "memory.h"
|
||||
#include "zebra_memory.h"
|
||||
#include "stream.h"
|
||||
#include "ioctl.h"
|
||||
#include "connected.h"
|
||||
|
@ -42,7 +42,6 @@
|
||||
#include "prefix.h"
|
||||
#include "command.h"
|
||||
#include "memory.h"
|
||||
#include "zebra_memory.h"
|
||||
#include "stream.h"
|
||||
#include "ioctl.h"
|
||||
#include "connected.h"
|
||||
|
@ -54,7 +54,6 @@
|
||||
#include "zclient.h"
|
||||
#include "lib_errors.h"
|
||||
|
||||
#include "zebra_memory.h"
|
||||
#include "zebra/interface.h"
|
||||
#include "zebra/rtadv.h"
|
||||
#include "zebra/rib.h"
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include "connected.h"
|
||||
#include "table.h"
|
||||
#include "memory.h"
|
||||
#include "zebra_memory.h"
|
||||
#include "rib.h"
|
||||
#include "thread.h"
|
||||
#include "privs.h"
|
||||
|
@ -32,7 +32,6 @@
|
||||
#include "sockunion.h"
|
||||
#include "connected.h"
|
||||
#include "memory.h"
|
||||
#include "zebra_memory.h"
|
||||
#include "ioctl.h"
|
||||
#include "log.h"
|
||||
#include "table.h"
|
||||
|
@ -26,7 +26,6 @@
|
||||
#include "thread.h"
|
||||
#include "filter.h"
|
||||
#include "memory.h"
|
||||
#include "zebra_memory.h"
|
||||
#include "prefix.h"
|
||||
#include "log.h"
|
||||
#include "plist.h"
|
||||
|
@ -41,7 +41,6 @@
|
||||
#include "zebra/debug.h"
|
||||
#include "zebra/router-id.h"
|
||||
#include "zebra/zapi_msg.h"
|
||||
#include "zebra/zebra_memory.h"
|
||||
#include "zebra/zebra_vxlan.h"
|
||||
#include "zebra/zebra_errors.h"
|
||||
|
||||
|
@ -23,6 +23,7 @@
|
||||
#define _ZEBRA_RIB_H
|
||||
|
||||
#include "zebra.h"
|
||||
#include "memory.h"
|
||||
#include "hook.h"
|
||||
#include "typesafe.h"
|
||||
#include "linklist.h"
|
||||
@ -41,6 +42,10 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
DECLARE_MGROUP(ZEBRA);
|
||||
|
||||
DECLARE_MTYPE(RE);
|
||||
|
||||
enum rnh_type { RNH_NEXTHOP_TYPE, RNH_IMPORT_CHECK_TYPE };
|
||||
|
||||
PREDECL_LIST(rnh_list);
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include "stream.h"
|
||||
#include "command.h"
|
||||
#include "memory.h"
|
||||
#include "zebra_memory.h"
|
||||
#include "ioctl.h"
|
||||
#include "connected.h"
|
||||
#include "network.h"
|
||||
|
@ -41,7 +41,6 @@
|
||||
#include "connected.h"
|
||||
#include "table.h"
|
||||
#include "memory.h"
|
||||
#include "zebra_memory.h"
|
||||
#include "rib.h"
|
||||
#include "thread.h"
|
||||
#include "privs.h"
|
||||
|
@ -23,7 +23,6 @@
|
||||
#include <zebra.h>
|
||||
|
||||
#include "memory.h"
|
||||
#include "zebra_memory.h"
|
||||
#include "sockopt.h"
|
||||
#include "thread.h"
|
||||
#include "if.h"
|
||||
|
@ -24,7 +24,6 @@
|
||||
#if !defined(GNU_LINUX)
|
||||
|
||||
#include "memory.h"
|
||||
#include "zebra_memory.h"
|
||||
#include "log.h"
|
||||
#include "vrf.h"
|
||||
|
||||
|
@ -88,7 +88,6 @@ zebra_zebra_SOURCES = \
|
||||
zebra/zebra_evpn_neigh.c \
|
||||
zebra/zebra_mlag.c \
|
||||
zebra/zebra_mlag_vty.c \
|
||||
zebra/zebra_memory.c \
|
||||
zebra/zebra_mpls.c \
|
||||
zebra/zebra_mpls_netlink.c \
|
||||
zebra/zebra_mpls_openbsd.c \
|
||||
@ -158,7 +157,6 @@ noinst_HEADERS += \
|
||||
zebra/zebra_evpn_vxlan.h \
|
||||
zebra/zebra_fpm_private.h \
|
||||
zebra/zebra_l2.h \
|
||||
zebra/zebra_memory.h \
|
||||
zebra/zebra_mlag.h \
|
||||
zebra/zebra_mlag_vty.h \
|
||||
zebra/zebra_mpls.h \
|
||||
|
@ -38,7 +38,6 @@
|
||||
|
||||
#include "zebra/zebra_router.h"
|
||||
#include "zebra/rib.h"
|
||||
#include "zebra/zebra_memory.h"
|
||||
#include "zebra/zebra_ns.h"
|
||||
#include "zebra/zebra_vrf.h"
|
||||
#include "zebra/router-id.h"
|
||||
@ -62,6 +61,8 @@
|
||||
#include "zebra/zebra_opaque.h"
|
||||
#include "zebra/zebra_srte.h"
|
||||
|
||||
DEFINE_MTYPE_STATIC(ZEBRA, OPAQUE, "Opaque Data");
|
||||
|
||||
static int zapi_nhg_decode(struct stream *s, int cmd, struct zapi_nhg *api_nhg);
|
||||
|
||||
/* Encoding helpers -------------------------------------------------------- */
|
||||
@ -2076,6 +2077,11 @@ static void zread_route_add(ZAPI_HANDLER_ARGS)
|
||||
}
|
||||
}
|
||||
|
||||
void zapi_opaque_free(struct opaque *opaque)
|
||||
{
|
||||
XFREE(MTYPE_OPAQUE, opaque);
|
||||
}
|
||||
|
||||
static void zread_route_del(ZAPI_HANDLER_ARGS)
|
||||
{
|
||||
struct stream *s;
|
||||
|
@ -111,6 +111,8 @@ extern int zsend_client_close_notify(struct zserv *client,
|
||||
int zsend_nhg_notify(uint16_t type, uint16_t instance, uint32_t session_id,
|
||||
uint32_t id, enum zapi_nhg_notify_owner note);
|
||||
|
||||
extern void zapi_opaque_free(struct opaque *opaque);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -28,7 +28,6 @@
|
||||
#include "lib/memory.h"
|
||||
#include "lib/queue.h"
|
||||
#include "lib/zebra.h"
|
||||
#include "zebra/zebra_memory.h"
|
||||
#include "zebra/zebra_router.h"
|
||||
#include "zebra/zebra_dplane.h"
|
||||
#include "zebra/zebra_vxlan_private.h"
|
||||
|
@ -44,7 +44,6 @@
|
||||
#include "zebra/rt_netlink.h"
|
||||
#include "zebra/zebra_errors.h"
|
||||
#include "zebra/zebra_l2.h"
|
||||
#include "zebra/zebra_memory.h"
|
||||
#include "zebra/zebra_ns.h"
|
||||
#include "zebra/zebra_vrf.h"
|
||||
#include "zebra/zebra_vxlan.h"
|
||||
|
@ -34,7 +34,6 @@
|
||||
#include "zebra/zserv.h"
|
||||
#include "zebra/debug.h"
|
||||
#include "zebra/zebra_router.h"
|
||||
#include "zebra/zebra_memory.h"
|
||||
#include "zebra/zebra_errors.h"
|
||||
#include "zebra/zebra_vrf.h"
|
||||
#include "zebra/zebra_evpn.h"
|
||||
|
@ -41,7 +41,6 @@
|
||||
#include "zebra/if_netlink.h"
|
||||
#include "zebra/zebra_errors.h"
|
||||
#include "zebra/zebra_l2.h"
|
||||
#include "zebra/zebra_memory.h"
|
||||
#include "zebra/zebra_ns.h"
|
||||
#include "zebra/zebra_vrf.h"
|
||||
#include "zebra/zebra_vxlan.h"
|
||||
|
@ -34,7 +34,6 @@
|
||||
#include "zebra/debug.h"
|
||||
#include "zebra/zebra_router.h"
|
||||
#include "zebra/rt.h"
|
||||
#include "zebra/zebra_memory.h"
|
||||
#include "zebra/zebra_errors.h"
|
||||
#include "zebra/zebra_vrf.h"
|
||||
#include "zebra/zebra_evpn.h"
|
||||
|
@ -37,7 +37,6 @@
|
||||
#include "zebra/zebra_ns.h"
|
||||
#include "zebra/zebra_vrf.h"
|
||||
#include "zebra/zebra_errors.h"
|
||||
#include "zebra/zebra_memory.h"
|
||||
|
||||
#include "fpm/fpm.h"
|
||||
#include "zebra_fpm_private.h"
|
||||
|
@ -38,7 +38,6 @@
|
||||
#include "zebra/zserv.h"
|
||||
#include "zebra/debug.h"
|
||||
#include "zebra/interface.h"
|
||||
#include "zebra/zebra_memory.h"
|
||||
#include "zebra/zebra_vrf.h"
|
||||
#include "zebra/rt_netlink.h"
|
||||
#include "zebra/interface.h"
|
||||
|
@ -1,33 +0,0 @@
|
||||
/* zebra memory type definitions
|
||||
*
|
||||
* Copyright (C) 2015 David Lamparter
|
||||
*
|
||||
* This file is part of Quagga.
|
||||
*
|
||||
* Quagga is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* Quagga is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; see the file COPYING; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "zebra_memory.h"
|
||||
|
||||
DEFINE_MGROUP(ZEBRA, "zebra");
|
||||
DEFINE_MTYPE(ZEBRA, RE, "Route Entry");
|
||||
DEFINE_MTYPE(ZEBRA, RIB_DEST, "RIB destination");
|
||||
DEFINE_MTYPE(ZEBRA, ZVLAN, "VLAN");
|
||||
DEFINE_MTYPE(ZEBRA, ZVLAN_BITMAP, "VLAN bitmap");
|
||||
DEFINE_MTYPE(ZEBRA, OPAQUE, "Opaque Data");
|
@ -1,41 +0,0 @@
|
||||
/* zebra memory type declarations
|
||||
*
|
||||
* Copyright (C) 2015 David Lamparter
|
||||
*
|
||||
* This file is part of Quagga.
|
||||
*
|
||||
* Quagga is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* Quagga is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; see the file COPYING; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef _QUAGGA_ZEBRA_MEMORY_H
|
||||
#define _QUAGGA_ZEBRA_MEMORY_H
|
||||
|
||||
#include "memory.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
DECLARE_MGROUP(ZEBRA);
|
||||
DECLARE_MTYPE(ZEBRA_NS);
|
||||
DECLARE_MTYPE(RE);
|
||||
DECLARE_MTYPE(RIB_DEST);
|
||||
DECLARE_MTYPE(OPAQUE);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _QUAGGA_ZEBRA_MEMORY_H */
|
@ -29,7 +29,6 @@
|
||||
#include "zebra/zebra_mlag.h"
|
||||
#include "zebra/zebra_mlag_vty.h"
|
||||
#include "zebra/zebra_router.h"
|
||||
#include "zebra/zebra_memory.h"
|
||||
#include "zebra/zapi_msg.h"
|
||||
#include "zebra/debug.h"
|
||||
|
||||
|
@ -44,7 +44,6 @@
|
||||
#include "zebra/zebra_router.h"
|
||||
#include "zebra/redistribute.h"
|
||||
#include "zebra/debug.h"
|
||||
#include "zebra/zebra_memory.h"
|
||||
#include "zebra/zebra_vrf.h"
|
||||
#include "zebra/zebra_mpls.h"
|
||||
#include "zebra/zebra_srte.h"
|
||||
|
@ -37,7 +37,6 @@
|
||||
#include "lib_errors.h"
|
||||
|
||||
#include "zebra_router.h"
|
||||
#include "zebra_memory.h"
|
||||
#endif /* defined(HAVE_NETLINK) */
|
||||
|
||||
#include "zebra_netns_notify.h"
|
||||
|
@ -36,7 +36,6 @@
|
||||
#include "zebra/zebra_nhg_private.h"
|
||||
#include "zebra/zebra_rnh.h"
|
||||
#include "zebra/zebra_routemap.h"
|
||||
#include "zebra/zebra_memory.h"
|
||||
#include "zebra/zebra_srte.h"
|
||||
#include "zebra/zserv.h"
|
||||
#include "zebra/rt.h"
|
||||
|
@ -28,7 +28,6 @@
|
||||
|
||||
#include "zebra_ns.h"
|
||||
#include "zebra_vrf.h"
|
||||
#include "zebra_memory.h"
|
||||
#include "rt.h"
|
||||
#include "zebra_vxlan.h"
|
||||
#include "debug.h"
|
||||
@ -41,7 +40,7 @@
|
||||
|
||||
extern struct zebra_privs_t zserv_privs;
|
||||
|
||||
DEFINE_MTYPE(ZEBRA, ZEBRA_NS, "Zebra Name Space");
|
||||
DEFINE_MTYPE_STATIC(ZEBRA, ZEBRA_NS, "Zebra Name Space");
|
||||
|
||||
static struct zebra_ns *dzns;
|
||||
|
||||
|
@ -24,7 +24,6 @@
|
||||
#include "lib/stream.h"
|
||||
#include "zebra/debug.h"
|
||||
#include "zebra/zserv.h"
|
||||
#include "zebra/zebra_memory.h"
|
||||
#include "zebra/zebra_opaque.h"
|
||||
|
||||
/* Mem type */
|
||||
|
@ -30,7 +30,6 @@
|
||||
#include "zebra/zebra_pbr.h"
|
||||
#include "zebra/rt.h"
|
||||
#include "zebra/zapi_msg.h"
|
||||
#include "zebra/zebra_memory.h"
|
||||
#include "zebra/zserv.h"
|
||||
#include "zebra/debug.h"
|
||||
|
||||
|
@ -1167,8 +1167,6 @@ void zebra_ptm_if_write(struct vty *vty, struct zebra_if *zebra_ifp)
|
||||
|
||||
#else /* HAVE_BFDD */
|
||||
|
||||
#include "zebra/zebra_memory.h"
|
||||
|
||||
/*
|
||||
* Data structures.
|
||||
*/
|
||||
|
@ -26,7 +26,6 @@
|
||||
#include "zebra/zapi_msg.h"
|
||||
#include "zebra/zebra_ptm.h"
|
||||
#include "zebra/zebra_ptm_redistribute.h"
|
||||
#include "zebra/zebra_memory.h"
|
||||
|
||||
static int zsend_interface_bfd_update(int cmd, struct zserv *client,
|
||||
struct interface *ifp, struct prefix *dp,
|
||||
|
@ -49,7 +49,6 @@
|
||||
#include "zebra/rt.h"
|
||||
#include "zebra/zapi_msg.h"
|
||||
#include "zebra/zebra_errors.h"
|
||||
#include "zebra/zebra_memory.h"
|
||||
#include "zebra/zebra_ns.h"
|
||||
#include "zebra/zebra_rnh.h"
|
||||
#include "zebra/zebra_routemap.h"
|
||||
@ -58,6 +57,10 @@
|
||||
#include "zebra/zapi_msg.h"
|
||||
#include "zebra/zebra_dplane.h"
|
||||
|
||||
DEFINE_MGROUP(ZEBRA, "zebra");
|
||||
|
||||
DEFINE_MTYPE(ZEBRA, RE, "Route Entry");
|
||||
DEFINE_MTYPE_STATIC(ZEBRA, RIB_DEST, "RIB destination");
|
||||
DEFINE_MTYPE_STATIC(ZEBRA, RIB_UPDATE_CTX, "Rib update context object");
|
||||
|
||||
/*
|
||||
@ -800,6 +803,23 @@ int rib_gc_dest(struct route_node *rn)
|
||||
return 1;
|
||||
}
|
||||
|
||||
void zebra_rtable_node_cleanup(struct route_table *table,
|
||||
struct route_node *node)
|
||||
{
|
||||
struct route_entry *re, *next;
|
||||
|
||||
RNODE_FOREACH_RE_SAFE (node, re, next) {
|
||||
rib_unlink(node, re);
|
||||
}
|
||||
|
||||
if (node->info) {
|
||||
rib_dest_t *dest = node->info;
|
||||
|
||||
rnh_list_fini(&dest->nht);
|
||||
XFREE(MTYPE_RIB_DEST, node->info);
|
||||
}
|
||||
}
|
||||
|
||||
static void rib_process_add_fib(struct zebra_vrf *zvrf, struct route_node *rn,
|
||||
struct route_entry *new)
|
||||
{
|
||||
@ -2698,7 +2718,7 @@ void rib_unlink(struct route_node *rn, struct route_entry *re)
|
||||
|
||||
nexthops_free(re->fib_ng.nexthop);
|
||||
|
||||
XFREE(MTYPE_OPAQUE, re->opaque);
|
||||
zapi_opaque_free(re->opaque);
|
||||
|
||||
XFREE(MTYPE_RE, re);
|
||||
}
|
||||
|
@ -48,7 +48,6 @@
|
||||
#include "zebra/zebra_routemap.h"
|
||||
#include "zebra/zebra_srte.h"
|
||||
#include "zebra/interface.h"
|
||||
#include "zebra/zebra_memory.h"
|
||||
#include "zebra/zebra_errors.h"
|
||||
|
||||
DEFINE_MTYPE_STATIC(ZEBRA, RNH, "Nexthop tracking object");
|
||||
|
@ -21,7 +21,6 @@
|
||||
#include <zebra.h>
|
||||
|
||||
#include "memory.h"
|
||||
#include "zebra_memory.h"
|
||||
#include "prefix.h"
|
||||
#include "rib.h"
|
||||
#include "vty.h"
|
||||
|
@ -25,7 +25,6 @@
|
||||
#include "lib/frratomic.h"
|
||||
|
||||
#include "zebra_router.h"
|
||||
#include "zebra_memory.h"
|
||||
#include "zebra_pbr.h"
|
||||
#include "zebra_vxlan.h"
|
||||
#include "zebra_mlag.h"
|
||||
@ -33,6 +32,7 @@
|
||||
#include "debug.h"
|
||||
|
||||
DEFINE_MTYPE_STATIC(ZEBRA, RIB_TABLE_INFO, "RIB table info");
|
||||
DEFINE_MTYPE_STATIC(ZEBRA, ZEBRA_RT_TABLE, "Zebra VRF table");
|
||||
|
||||
struct zebra_router zrouter = {
|
||||
.multipath_num = MULTIPATH_NUM,
|
||||
@ -121,7 +121,7 @@ struct route_table *zebra_router_get_table(struct zebra_vrf *zvrf,
|
||||
if (zrt)
|
||||
return zrt->table;
|
||||
|
||||
zrt = XCALLOC(MTYPE_ZEBRA_NS, sizeof(*zrt));
|
||||
zrt = XCALLOC(MTYPE_ZEBRA_RT_TABLE, sizeof(*zrt));
|
||||
zrt->tableid = tableid;
|
||||
zrt->afi = afi;
|
||||
zrt->safi = safi;
|
||||
@ -185,7 +185,7 @@ static void zebra_router_free_table(struct zebra_router_table *zrt)
|
||||
RB_REMOVE(zebra_router_table_head, &zrouter.tables, zrt);
|
||||
|
||||
XFREE(MTYPE_RIB_TABLE_INFO, table_info);
|
||||
XFREE(MTYPE_ZEBRA_NS, zrt);
|
||||
XFREE(MTYPE_ZEBRA_RT_TABLE, zrt);
|
||||
}
|
||||
|
||||
void zebra_router_release_table(struct zebra_vrf *zvrf, uint32_t tableid,
|
||||
|
@ -24,7 +24,6 @@
|
||||
#include "lib/lib_errors.h"
|
||||
|
||||
#include "zebra/zebra_srte.h"
|
||||
#include "zebra/zebra_memory.h"
|
||||
#include "zebra/zebra_mpls.h"
|
||||
#include "zebra/zebra_rnh.h"
|
||||
#include "zebra/zapi_msg.h"
|
||||
|
@ -36,7 +36,6 @@
|
||||
#include "zebra/zebra_vrf.h"
|
||||
#include "zebra/zebra_rnh.h"
|
||||
#include "zebra/router-id.h"
|
||||
#include "zebra/zebra_memory.h"
|
||||
#include "zebra/interface.h"
|
||||
#include "zebra/zebra_mpls.h"
|
||||
#include "zebra/zebra_vxlan.h"
|
||||
@ -413,23 +412,6 @@ done:
|
||||
return table;
|
||||
}
|
||||
|
||||
void zebra_rtable_node_cleanup(struct route_table *table,
|
||||
struct route_node *node)
|
||||
{
|
||||
struct route_entry *re, *next;
|
||||
|
||||
RNODE_FOREACH_RE_SAFE (node, re, next) {
|
||||
rib_unlink(node, re);
|
||||
}
|
||||
|
||||
if (node->info) {
|
||||
rib_dest_t *dest = node->info;
|
||||
|
||||
rnh_list_fini(&dest->nht);
|
||||
XFREE(MTYPE_RIB_DEST, node->info);
|
||||
}
|
||||
}
|
||||
|
||||
static void zebra_rnhtable_node_cleanup(struct route_table *table,
|
||||
struct route_node *node)
|
||||
{
|
||||
|
@ -21,7 +21,6 @@
|
||||
#include <zebra.h>
|
||||
|
||||
#include "memory.h"
|
||||
#include "zebra_memory.h"
|
||||
#include "if.h"
|
||||
#include "prefix.h"
|
||||
#include "command.h"
|
||||
|
@ -46,7 +46,6 @@
|
||||
#include "zebra/rt_netlink.h"
|
||||
#include "zebra/zebra_errors.h"
|
||||
#include "zebra/zebra_l2.h"
|
||||
#include "zebra/zebra_memory.h"
|
||||
#include "zebra/zebra_ns.h"
|
||||
#include "zebra/zebra_vrf.h"
|
||||
#include "zebra/zebra_vxlan.h"
|
||||
|
Loading…
Reference in New Issue
Block a user