summaryrefslogtreecommitdiffstats
path: root/isisd/isis_spf_private.h
diff options
context:
space:
mode:
authorChristian Franke <chris@opensourcerouting.org>2018-05-10 20:02:04 +0200
committerChristian Franke <chris@opensourcerouting.org>2018-09-05 11:38:13 +0200
commit686afe9f0700b561ea493d2041f5cf16b8d92538 (patch)
tree2de5c5eec7252146bfa12a960b231ded030963b2 /isisd/isis_spf_private.h
parentfabricd: support transmission/reception of circuit-scoped LSPs (diff)
downloadfrr-686afe9f0700b561ea493d2041f5cf16b8d92538.tar.xz
frr-686afe9f0700b561ea493d2041f5cf16b8d92538.zip
fabricd: add field with first and second nexthop to SPF paths
OpenFabric requires knowledge of the first two hops on each path calculated by spf to implement its flooding optimization. Extend the hopcount-spf to build such a datastructure. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Diffstat (limited to 'isisd/isis_spf_private.h')
-rw-r--r--isisd/isis_spf_private.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/isisd/isis_spf_private.h b/isisd/isis_spf_private.h
index 3cd6a005b..4478c7a99 100644
--- a/isisd/isis_spf_private.h
+++ b/isisd/isis_spf_private.h
@@ -64,6 +64,7 @@ struct isis_vertex {
uint16_t depth; /* The depth in the imaginary tree */
struct list *Adj_N; /* {Adj(N)} next hop or neighbor list */
struct list *parents; /* list of parents for ECMP */
+ struct hash *firsthops; /* first two hops to neighbor */
uint64_t insert_counter;
};
@@ -170,6 +171,11 @@ static void isis_vertex_del(struct isis_vertex *vertex)
{
list_delete_and_null(&vertex->Adj_N);
list_delete_and_null(&vertex->parents);
+ if (vertex->firsthops) {
+ hash_clean(vertex->firsthops, NULL);
+ hash_free(vertex->firsthops);
+ vertex->firsthops = NULL;
+ }
memset(vertex, 0, sizeof(struct isis_vertex));
XFREE(MTYPE_ISIS_VERTEX, vertex);