From: Christian Franke Date: Wed, 23 May 2018 13:37:45 +0000 (+0200) Subject: fabricd: implement asymmetric metric for tier 0 as per Section 6.2 X-Git-Tag: frr-7.1-dev~384^2~17 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=a191178d0a500a4f016d22235bed13790fd6968e;p=mirror%2Ffrr.git fabricd: implement asymmetric metric for tier 0 as per Section 6.2 To avoid passing of traffic via leaf nodes in the fabric, OpenFabric specifies that all links towards tier 0 nodes should be advertised with a very high metric. Signed-off-by: Christian Franke --- diff --git a/isisd/isis_lsp.c b/isisd/isis_lsp.c index f8ebce2efd..b7e0b4b553 100644 --- a/isisd/isis_lsp.c +++ b/isisd/isis_lsp.c @@ -1100,9 +1100,16 @@ static void lsp_build(struct isis_lsp *lsp, struct isis_area *area) */ subtlv_len = 0; + uint32_t neighbor_metric; + if (fabricd_tier(area) == 0) { + neighbor_metric = 0xffe; + } else { + neighbor_metric = metric; + } + tlvs_add_mt_p2p(lsp->tlvs, circuit, - ne_id, metric, subtlvs, - subtlv_len); + ne_id, neighbor_metric, + subtlvs, subtlv_len); } } else { lsp_debug(