summaryrefslogtreecommitdiff
path: root/bgpd/bgp_attr.c
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/bgp_attr.c')
-rw-r--r--bgpd/bgp_attr.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c
index 82d907e2..94168372 100644
--- a/bgpd/bgp_attr.c
+++ b/bgpd/bgp_attr.c
@@ -148,6 +148,7 @@ cluster_free (struct cluster_list *cluster)
XFREE (MTYPE_CLUSTER, cluster);
}
+#if 0
static struct cluster_list *
cluster_dup (struct cluster_list *cluster)
{
@@ -166,6 +167,7 @@ cluster_dup (struct cluster_list *cluster)
return new;
}
+#endif
static struct cluster_list *
cluster_intern (struct cluster_list *cluster)
@@ -198,6 +200,13 @@ cluster_init (void)
{
cluster_hash = hash_create (cluster_hash_key_make, cluster_hash_cmp);
}
+
+static void
+cluster_finish (void)
+{
+ hash_free (cluster_hash);
+ cluster_hash = NULL;
+}
/* Unknown transit attribute. */
static struct hash *transit_hash;
@@ -278,6 +287,13 @@ transit_init (void)
{
transit_hash = hash_create (transit_hash_key_make, transit_hash_cmp);
}
+
+static void
+transit_finish (void)
+{
+ hash_free (transit_hash);
+ transit_hash = NULL;
+}
/* Attribute hash routines. */
static struct hash *attrhash;
@@ -436,6 +452,13 @@ attrhash_init (void)
}
static void
+attrhash_finish (void)
+{
+ hash_free (attrhash);
+ attrhash = NULL;
+}
+
+static void
attr_show_all_iterator (struct hash_backet *backet, struct vty *vty)
{
struct attr *attr = backet->data;
@@ -2302,6 +2325,17 @@ bgp_attr_init (void)
transit_init ();
}
+void
+bgp_attr_finish (void)
+{
+ aspath_finish ();
+ attrhash_finish ();
+ community_finish ();
+ ecommunity_finish ();
+ cluster_finish ();
+ transit_finish ();
+}
+
/* Make attribute packet. */
void
bgp_dump_routes_attr (struct stream *s, struct attr *attr,