summaryrefslogtreecommitdiffstats
path: root/isisd
diff options
context:
space:
mode:
authorChristian Franke <chris@opensourcerouting.org>2017-05-06 15:50:50 +0200
committerChristian Franke <chris@opensourcerouting.org>2017-05-06 15:50:50 +0200
commitcb02eebe01cf9291582677505c8e3fa826cd9d25 (patch)
treebeeb352c72b609c65834ba451911b83694771ed2 /isisd
parentisisd: support unnumbered operation (diff)
downloadfrr-cb02eebe01cf9291582677505c8e3fa826cd9d25.tar.xz
frr-cb02eebe01cf9291582677505c8e3fa826cd9d25.zip
isisd: use MT to only advertise usable links
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Diffstat (limited to 'isisd')
-rw-r--r--isisd/isis_mt.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/isisd/isis_mt.c b/isisd/isis_mt.c
index 552365ad1..d15da1d27 100644
--- a/isisd/isis_mt.c
+++ b/isisd/isis_mt.c
@@ -415,7 +415,7 @@ tlvs_to_adj_mt_set(struct tlvs *tlvs, bool v4_usable, bool v6_usable,
if (!tlvs->mt_router_info)
{
/* Other end does not have MT enabled */
- if (mt_settings[i]->mtid == ISIS_MT_IPV4_UNICAST)
+ if (mt_settings[i]->mtid == ISIS_MT_IPV4_UNICAST && v4_usable)
adj_mt_set(adj, intersect_count++, ISIS_MT_IPV4_UNICAST);
}
else
@@ -425,7 +425,27 @@ tlvs_to_adj_mt_set(struct tlvs *tlvs, bool v4_usable, bool v6_usable,
for (ALL_LIST_ELEMENTS_RO(tlvs->mt_router_info, node, info))
{
if (mt_settings[i]->mtid == info->mtid)
- adj_mt_set(adj, intersect_count++, info->mtid);
+ {
+ bool usable;
+ switch (info->mtid)
+ {
+ case ISIS_MT_IPV4_UNICAST:
+ case ISIS_MT_IPV4_MGMT:
+ case ISIS_MT_IPV4_MULTICAST:
+ usable = v4_usable;
+ break;
+ case ISIS_MT_IPV6_UNICAST:
+ case ISIS_MT_IPV6_MGMT:
+ case ISIS_MT_IPV6_MULTICAST:
+ usable = v6_usable;
+ break;
+ default:
+ usable = true;
+ break;
+ }
+ if (usable)
+ adj_mt_set(adj, intersect_count++, info->mtid);
+ }
}
}
}