summaryrefslogtreecommitdiffstats
path: root/tests/isisd
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 /tests/isisd
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 'tests/isisd')
-rw-r--r--tests/isisd/test_isis_vertex_queue.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/isisd/test_isis_vertex_queue.c b/tests/isisd/test_isis_vertex_queue.c
index 3e31b8335..96c215dcf 100644
--- a/tests/isisd/test_isis_vertex_queue.c
+++ b/tests/isisd/test_isis_vertex_queue.c
@@ -16,6 +16,8 @@ static size_t vertex_count;
static void setup_test_vertices(void)
{
+ struct isis_spftree t = {
+ };
union isis_N nid, nip = {
.ip.dest.family = AF_UNSPEC
};
@@ -25,33 +27,35 @@ static void setup_test_vertices(void)
nip.ip.dest.family = AF_INET;
nip.ip.dest.prefixlen = 24;
inet_pton(AF_INET, "192.168.1.0", &nip.ip.dest.u.prefix4);
- vertices[vertex_count] = isis_vertex_new(&nip, VTYPE_IPREACH_TE);
+ vertices[vertex_count] = isis_vertex_new(&t, &nip, VTYPE_IPREACH_TE);
vertices[vertex_count]->d_N = 20;
vertex_count++;
nip.ip.dest.family = AF_INET;
nip.ip.dest.prefixlen = 24;
inet_pton(AF_INET, "192.168.2.0", &nip.ip.dest.u.prefix4);
- vertices[vertex_count] = isis_vertex_new(&nip, VTYPE_IPREACH_TE);
+ vertices[vertex_count] = isis_vertex_new(&t, &nip, VTYPE_IPREACH_TE);
vertices[vertex_count]->d_N = 20;
vertex_count++;
memset(nid.id, 0, sizeof(nid.id));
nid.id[6] = 1;
- vertices[vertex_count] = isis_vertex_new(&nid, VTYPE_PSEUDO_TE_IS);
+ vertices[vertex_count] = isis_vertex_new(&t, &nid,
+ VTYPE_PSEUDO_TE_IS);
vertices[vertex_count]->d_N = 15;
vertex_count++;
memset(nid.id, 0, sizeof(nid.id));
nid.id[5] = 2;
- vertices[vertex_count] = isis_vertex_new(&nid, VTYPE_NONPSEUDO_TE_IS);
+ vertices[vertex_count] = isis_vertex_new(&t, &nid,
+ VTYPE_NONPSEUDO_TE_IS);
vertices[vertex_count]->d_N = 15;
vertex_count++;
nip.ip.dest.family = AF_INET;
nip.ip.dest.prefixlen = 24;
inet_pton(AF_INET, "192.168.3.0", &nip.ip.dest.u.prefix4);
- vertices[vertex_count] = isis_vertex_new(&nip, VTYPE_IPREACH_TE);
+ vertices[vertex_count] = isis_vertex_new(&t, &nip, VTYPE_IPREACH_TE);
vertices[vertex_count]->d_N = 20;
vertex_count++;
};