diff options
| author | Christian Franke <chris@opensourcerouting.org> | 2018-05-23 15:37:45 +0200 |
|---|---|---|
| committer | Christian Franke <chris@opensourcerouting.org> | 2018-09-05 11:38:13 +0200 |
| commit | a191178d0a500a4f016d22235bed13790fd6968e (patch) | |
| tree | 5008a51bc2f1010238dcce6fe7a0d14753ad81a0 | |
| parent | 75e0ec941509a8a38589fa61b139e85b6ccc48a5 (diff) | |
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 <chris@opensourcerouting.org>
| -rw-r--r-- | isisd/isis_lsp.c | 11 |
1 files changed, 9 insertions, 2 deletions
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( |
