]> git.puffer.fish Git - mirror/frr.git/commitdiff
fabricd: implement asymmetric metric for tier 0 as per Section 6.2
authorChristian Franke <chris@opensourcerouting.org>
Wed, 23 May 2018 13:37:45 +0000 (15:37 +0200)
committerChristian Franke <chris@opensourcerouting.org>
Wed, 5 Sep 2018 09:38:13 +0000 (11:38 +0200)
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>
isisd/isis_lsp.c

index f8ebce2efd4d237200456fdfdc0ca6b73308fa6d..b7e0b4b553ecb409a144335c48df5d4fc9b83cab 100644 (file)
@@ -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(