summaryrefslogtreecommitdiffstats
path: root/isisd/isis_adjacency.c
diff options
context:
space:
mode:
authorChristian Franke <chris@opensourcerouting.org>2017-04-27 13:56:41 +0200
committerChristian Franke <chris@opensourcerouting.org>2017-04-28 12:03:23 +0200
commitd8fba7d9742b93545a49b5e280825ecdf083d1a0 (patch)
tree035f80aeb7c4c32c4f498c49e935474d8e0f9118 /isisd/isis_adjacency.c
parentisisd: announce MT capabilities in IIH and LSP (diff)
downloadfrr-d8fba7d9742b93545a49b5e280825ecdf083d1a0.tar.xz
frr-d8fba7d9742b93545a49b5e280825ecdf083d1a0.zip
isisd: track intersecting set of supported MTs for each adj
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Diffstat (limited to 'isisd/isis_adjacency.c')
-rw-r--r--isisd/isis_adjacency.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/isisd/isis_adjacency.c b/isisd/isis_adjacency.c
index f55092487..c6fc6b008 100644
--- a/isisd/isis_adjacency.c
+++ b/isisd/isis_adjacency.c
@@ -148,6 +148,8 @@ isis_delete_adj (void *arg)
if (adj->ipv6_addrs)
list_delete (adj->ipv6_addrs);
+ adj_mt_finish(adj);
+
XFREE (MTYPE_ISIS_ADJACENCY, adj);
return;
}
@@ -521,3 +523,20 @@ isis_adj_build_up_list (struct list *adjdb, struct list *list)
return;
}
+
+int
+isis_adj_usage2levels(enum isis_adj_usage usage)
+{
+ switch (usage)
+ {
+ case ISIS_ADJ_LEVEL1:
+ return IS_LEVEL_1;
+ case ISIS_ADJ_LEVEL2:
+ return IS_LEVEL_2;
+ case ISIS_ADJ_LEVEL1AND2:
+ return IS_LEVEL_1 | IS_LEVEL_2;
+ default:
+ break;
+ }
+ return 0;
+}