From: Olivier Dugeon Date: Fri, 8 Apr 2022 15:10:25 +0000 (+0200) Subject: isisd: Stop fulfill MPLS table when SR is disabled X-Git-Tag: base_8.3~14^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=7700a88aa5c5c038868750c5a4a0061d34d22214;p=matthieu%2Ffrr.git isisd: Stop fulfill MPLS table when SR is disabled When Segment Routing is disabled, if isisd received LSP with Segment Routing information, in particular prefix SIDs, it installs corresponding MPLS entries while it should not as SR is disabled. This patch adds extra control to verify if SR is enabled or not before configuring MPLS LFIB & IP FIB with prefix SIDs and adjust SR & TI-LFA tests accordingly. Signed-off-by: Olivier Dugeon --- diff --git a/isisd/isis_spf.c b/isisd/isis_spf.c index 49c62d2cf5..09f92554c0 100644 --- a/isisd/isis_spf.c +++ b/isisd/isis_spf.c @@ -273,7 +273,7 @@ isis_vertex_adj_add(struct isis_spftree *spftree, struct isis_vertex *vertex, vadj = XCALLOC(MTYPE_ISIS_VERTEX_ADJ, sizeof(*vadj)); vadj->sadj = sadj; - if (psid) { + if (spftree->area->srdb.enabled && psid) { if (vertex->N.ip.sr.present && vertex->N.ip.sr.sid.value != psid->value) zlog_warn( @@ -575,7 +575,7 @@ isis_spf_add2tent(struct isis_spftree *spftree, enum vertextype vtype, void *id, vertex = isis_vertex_new(spftree, id, vtype); vertex->d_N = cost; vertex->depth = depth; - if (VTYPE_IP(vtype) && psid) { + if (VTYPE_IP(vtype) && spftree->area->srdb.enabled && psid) { struct isis_area *area = spftree->area; struct isis_vertex *vertex_psid; @@ -975,9 +975,9 @@ lspfragloop: ip_info.dest.u.prefix4 = r->prefix.prefix; ip_info.dest.prefixlen = r->prefix.prefixlen; - /* Parse list of Prefix-SID subTLVs */ + /* Parse list of Prefix-SID subTLVs if SR is enabled */ has_valid_psid = false; - if (r->subtlvs) { + if (spftree->area->srdb.enabled && r->subtlvs) { for (struct isis_item *i = r->subtlvs->prefix_sids.head; i; i = i->next) { @@ -1026,9 +1026,9 @@ lspfragloop: ip_info.dest.u.prefix6 = r->prefix.prefix; ip_info.dest.prefixlen = r->prefix.prefixlen; - if (r->subtlvs - && r->subtlvs->source_prefix - && r->subtlvs->source_prefix->prefixlen) { + if (spftree->area->srdb.enabled && r->subtlvs && + r->subtlvs->source_prefix && + r->subtlvs->source_prefix->prefixlen) { if (spftree->tree_id != SPFTREE_DSTSRC) { char buff[VID2STR_BUFFER]; zlog_warn("Ignoring dest-src route %s in non dest-src topology", @@ -1169,8 +1169,8 @@ static int isis_spf_preload_tent_ip_reach_cb(const struct prefix *prefix, else vtype = VTYPE_IP6REACH_INTERNAL; - /* Parse list of Prefix-SID subTLVs */ - if (subtlvs) { + /* Parse list of Prefix-SID subTLVs if SR is enabled */ + if (spftree->area->srdb.enabled && subtlvs) { for (struct isis_item *i = subtlvs->prefix_sids.head; i; i = i->next) { struct isis_prefix_sid *psid = diff --git a/isisd/isis_sr.c b/isisd/isis_sr.c index 91886cbc37..107fa71d71 100644 --- a/isisd/isis_sr.c +++ b/isisd/isis_sr.c @@ -1070,7 +1070,10 @@ DEFUN(show_sr_node, show_sr_node_cmd, for (ALL_LIST_ELEMENTS_RO(isis->area_list, node, area)) { vty_out(vty, "Area %s:\n", area->area_tag ? area->area_tag : "null"); - + if (!area->srdb.enabled) { + vty_out(vty, " Segment Routing is disabled\n"); + continue; + } for (int level = ISIS_LEVEL1; level <= ISIS_LEVELS; level++) show_node(vty, area, level); diff --git a/tests/topotests/isis_sr_topo1/rt6/step5/show_ip_route.ref b/tests/topotests/isis_sr_topo1/rt6/step5/show_ip_route.ref index 4b204dbc4c..3ccd57a6fd 100644 --- a/tests/topotests/isis_sr_topo1/rt6/step5/show_ip_route.ref +++ b/tests/topotests/isis_sr_topo1/rt6/step5/show_ip_route.ref @@ -14,20 +14,14 @@ "ip":"10.0.7.4", "afi":"ipv4", "interfaceName":"eth-rt4", - "active":true, - "labels":[ - 16010 - ] + "active":true }, { "fib":true, "ip":"10.0.8.5", "afi":"ipv4", "interfaceName":"eth-rt5", - "active":true, - "labels":[ - 16010 - ] + "active":true } ] } @@ -47,10 +41,7 @@ "ip":"10.0.7.4", "afi":"ipv4", "interfaceName":"eth-rt4", - "active":true, - "labels":[ - 16020 - ] + "active":true } ] } @@ -70,10 +61,7 @@ "ip":"10.0.8.5", "afi":"ipv4", "interfaceName":"eth-rt5", - "active":true, - "labels":[ - 16030 - ] + "active":true } ] } @@ -93,10 +81,7 @@ "ip":"10.0.7.4", "afi":"ipv4", "interfaceName":"eth-rt4", - "active":true, - "labels":[ - 16040 - ] + "active":true } ] } @@ -116,10 +101,7 @@ "ip":"10.0.8.5", "afi":"ipv4", "interfaceName":"eth-rt5", - "active":true, - "labels":[ - 16050 - ] + "active":true } ] } @@ -296,20 +278,14 @@ "ip":"10.0.7.4", "afi":"ipv4", "interfaceName":"eth-rt4", - "active":true, - "labels":[ - 16100 - ] + "active":true }, { "fib":true, "ip":"10.0.8.5", "afi":"ipv4", "interfaceName":"eth-rt5", - "active":true, - "labels":[ - 16100 - ] + "active":true } ] } diff --git a/tests/topotests/isis_sr_topo1/rt6/step5/show_ipv6_route.ref b/tests/topotests/isis_sr_topo1/rt6/step5/show_ipv6_route.ref index 834cdfe6ca..22d3f2a246 100644 --- a/tests/topotests/isis_sr_topo1/rt6/step5/show_ipv6_route.ref +++ b/tests/topotests/isis_sr_topo1/rt6/step5/show_ipv6_route.ref @@ -13,19 +13,13 @@ "fib":true, "afi":"ipv6", "interfaceName":"eth-rt4", - "active":true, - "labels":[ - 16011 - ] + "active":true }, { "fib":true, "afi":"ipv6", "interfaceName":"eth-rt5", - "active":true, - "labels":[ - 16011 - ] + "active":true } ] } @@ -44,10 +38,7 @@ "fib":true, "afi":"ipv6", "interfaceName":"eth-rt4", - "active":true, - "labels":[ - 16021 - ] + "active":true } ] } @@ -66,10 +57,7 @@ "fib":true, "afi":"ipv6", "interfaceName":"eth-rt5", - "active":true, - "labels":[ - 16031 - ] + "active":true } ] } @@ -88,10 +76,7 @@ "fib":true, "afi":"ipv6", "interfaceName":"eth-rt4", - "active":true, - "labels":[ - 16041 - ] + "active":true } ] } @@ -110,10 +95,7 @@ "fib":true, "afi":"ipv6", "interfaceName":"eth-rt5", - "active":true, - "labels":[ - 16051 - ] + "active":true } ] } @@ -132,19 +114,13 @@ "fib":true, "afi":"ipv6", "interfaceName":"eth-rt4", - "active":true, - "labels":[ - 16101 - ] + "active":true }, { "fib":true, "afi":"ipv6", "interfaceName":"eth-rt5", - "active":true, - "labels":[ - 16101 - ] + "active":true } ] } diff --git a/tests/topotests/isis_sr_topo1/rt6/step5/show_mpls_table.ref b/tests/topotests/isis_sr_topo1/rt6/step5/show_mpls_table.ref index be87ed90a0..2c63c08510 100644 --- a/tests/topotests/isis_sr_topo1/rt6/step5/show_mpls_table.ref +++ b/tests/topotests/isis_sr_topo1/rt6/step5/show_mpls_table.ref @@ -1,170 +1,2 @@ { - "18010":{ - "inLabel":18010, - "installed":true, - "nexthops":[ - { - "type":"SR (IS-IS)", - "outLabel":16010, - "installed":true, - "nexthop":"10.0.8.5" - }, - { - "type":"SR (IS-IS)", - "outLabel":16010, - "installed":true, - "nexthop":"10.0.7.4" - } - ] - }, - "18011":{ - "inLabel":18011, - "installed":true, - "nexthops":[ - { - "type":"SR (IS-IS)", - "outLabel":16011, - "installed":true, - "interface":"eth-rt5" - }, - { - "type":"SR (IS-IS)", - "outLabel":16011, - "installed":true, - "interface":"eth-rt4" - } - ] - }, - "18020":{ - "inLabel":18020, - "installed":true, - "nexthops":[ - { - "type":"SR (IS-IS)", - "outLabel":16020, - "installed":true, - "nexthop":"10.0.7.4" - } - ] - }, - "18021":{ - "inLabel":18021, - "installed":true, - "nexthops":[ - { - "type":"SR (IS-IS)", - "outLabel":16021, - "installed":true, - "interface":"eth-rt4" - } - ] - }, - "18030":{ - "inLabel":18030, - "installed":true, - "nexthops":[ - { - "type":"SR (IS-IS)", - "outLabel":16030, - "installed":true, - "nexthop":"10.0.8.5" - } - ] - }, - "18031":{ - "inLabel":18031, - "installed":true, - "nexthops":[ - { - "type":"SR (IS-IS)", - "outLabel":16031, - "installed":true, - "interface":"eth-rt5" - } - ] - }, - "18040":{ - "inLabel":18040, - "installed":true, - "nexthops":[ - { - "type":"SR (IS-IS)", - "outLabel":16040, - "installed":true, - "nexthop":"10.0.7.4" - } - ] - }, - "18041":{ - "inLabel":18041, - "installed":true, - "nexthops":[ - { - "type":"SR (IS-IS)", - "outLabel":16041, - "installed":true, - "interface":"eth-rt4" - } - ] - }, - "18050":{ - "inLabel":18050, - "installed":true, - "nexthops":[ - { - "type":"SR (IS-IS)", - "outLabel":16050, - "installed":true, - "nexthop":"10.0.8.5" - } - ] - }, - "18051":{ - "inLabel":18051, - "installed":true, - "nexthops":[ - { - "type":"SR (IS-IS)", - "outLabel":16051, - "installed":true, - "interface":"eth-rt5" - } - ] - }, - "18100":{ - "inLabel":18100, - "installed":true, - "nexthops":[ - { - "type":"SR (IS-IS)", - "outLabel":16100, - "installed":true, - "nexthop":"10.0.8.5" - }, - { - "type":"SR (IS-IS)", - "outLabel":16100, - "installed":true, - "nexthop":"10.0.7.4" - } - ] - }, - "18101":{ - "inLabel":18101, - "installed":true, - "nexthops":[ - { - "type":"SR (IS-IS)", - "outLabel":16101, - "installed":true, - "interface":"eth-rt5" - }, - { - "type":"SR (IS-IS)", - "outLabel":16101, - "installed":true, - "interface":"eth-rt4" - } - ] - } } diff --git a/tests/topotests/isis_tilfa_topo1/rt4/step4/show_ip_route.ref.diff b/tests/topotests/isis_tilfa_topo1/rt4/step4/show_ip_route.ref.diff index 8b115c2058..a9418473c7 100644 --- a/tests/topotests/isis_tilfa_topo1/rt4/step4/show_ip_route.ref.diff +++ b/tests/topotests/isis_tilfa_topo1/rt4/step4/show_ip_route.ref.diff @@ -1,19 +1,24 @@ --- a/rt4/step3/show_ip_route.ref +++ b/rt4/step4/show_ip_route.ref -@@ -15,9 +15,6 @@ +@@ -14,37 +14,14 @@ + "ip":"10.0.2.2", "afi":"ipv4", "interfaceName":"eth-rt2-1", - "active":true, +- "active":true, - "backupIndex":[ - 0 - ], - "labels":[ - 16010 - ] -@@ -28,20 +25,6 @@ +- "labels":[ +- 16010 +- ] ++ "active":true + }, + { + "fib":true, + "ip":"10.0.3.2", "afi":"ipv4", "interfaceName":"eth-rt2-2", - "active":true, +- "active":true, - "backupIndex":[ - 0 - ], @@ -28,30 +33,39 @@ - "afi":"ipv4", - "interfaceName":"eth-rt5", - "active":true, - "labels":[ - 16010 - ] -@@ -65,9 +48,6 @@ +- "labels":[ +- 16010 +- ] ++ "active":true + } + ] + } +@@ -64,38 +41,14 @@ + "ip":"10.0.2.2", "afi":"ipv4", "interfaceName":"eth-rt2-1", - "active":true, +- "active":true, - "backupIndex":[ - 0 - ], - "labels":[ - 3 - ] -@@ -78,25 +58,10 @@ +- "labels":[ +- 3 +- ] ++ "active":true + }, + { + "fib":true, + "ip":"10.0.3.2", "afi":"ipv4", "interfaceName":"eth-rt2-2", - "active":true, +- "active":true, - "backupIndex":[ - 0 - ], - "labels":[ - 3 - ] - } +- "labels":[ +- 3 +- ] +- } - ], - "backupNexthops":[ - { @@ -63,21 +77,56 @@ - 16030, - 16020 - ] -- } ++ "active":true + } + ] + } +@@ -115,30 +68,21 @@ + "ip":"10.0.2.2", + "afi":"ipv4", + "interfaceName":"eth-rt2-1", +- "active":true, +- "labels":[ +- 16030 +- ] ++ "active":true + }, + { + "fib":true, + "ip":"10.0.3.2", + "afi":"ipv4", + "interfaceName":"eth-rt2-2", +- "active":true, +- "labels":[ +- 16030 +- ] ++ "active":true + }, + { + "fib":true, + "ip":"10.0.6.5", + "afi":"ipv4", + "interfaceName":"eth-rt5", +- "active":true, +- "labels":[ +- 16030 +- ] ++ "active":true + } ] } - ], -@@ -159,24 +124,10 @@ +@@ -158,24 +102,7 @@ + "ip":"10.0.6.5", "afi":"ipv4", "interfaceName":"eth-rt5", - "active":true, +- "active":true, - "backupIndex":[ - 0 - ], - "labels":[ - 3 - ] - } +- "labels":[ +- 3 +- ] +- } - ], - "backupNexthops":[ - { @@ -88,21 +137,22 @@ - "labels":[ - 16050 - ] -- } ++ "active":true + } ] } - ], -@@ -196,24 +147,10 @@ +@@ -195,24 +122,7 @@ + "ip":"10.0.7.6", "afi":"ipv4", "interfaceName":"eth-rt6", - "active":true, +- "active":true, - "backupIndex":[ - 0 - ], - "labels":[ - 3 - ] - } +- "labels":[ +- 3 +- ] +- } - ], - "backupNexthops":[ - { @@ -113,11 +163,11 @@ - "labels":[ - 16060 - ] -- } ++ "active":true + } ] } - ], -@@ -232,27 +169,13 @@ +@@ -232,27 +142,13 @@ "ip":"10.0.2.2", "afi":"ipv4", "interfaceName":"eth-rt2-1", @@ -146,7 +196,7 @@ "active":true } ] -@@ -268,30 +191,13 @@ +@@ -268,30 +164,13 @@ { "ip":"10.0.2.2", "afi":"ipv4", @@ -179,7 +229,7 @@ } ] } -@@ -307,29 +213,12 @@ +@@ -307,29 +186,12 @@ "ip":"10.0.2.2", "afi":"ipv4", "interfaceName":"eth-rt2-1", @@ -211,7 +261,7 @@ } ] } -@@ -349,31 +238,6 @@ +@@ -349,31 +211,6 @@ "ip":"10.0.6.5", "afi":"ipv4", "interfaceName":"eth-rt5", @@ -243,7 +293,7 @@ "active":true } ] -@@ -394,31 +258,6 @@ +@@ -394,31 +231,6 @@ "ip":"10.0.6.5", "afi":"ipv4", "interfaceName":"eth-rt5", @@ -275,7 +325,7 @@ "active":true } ] -@@ -434,18 +273,7 @@ +@@ -434,18 +246,7 @@ { "ip":"10.0.6.5", "afi":"ipv4", @@ -295,7 +345,7 @@ } ] } -@@ -460,18 +288,7 @@ +@@ -460,18 +261,7 @@ { "ip":"10.0.7.6", "afi":"ipv4", diff --git a/tests/topotests/isis_tilfa_topo1/rt4/step4/show_ipv6_route.ref.diff b/tests/topotests/isis_tilfa_topo1/rt4/step4/show_ipv6_route.ref.diff index 7f39285089..991562ab99 100644 --- a/tests/topotests/isis_tilfa_topo1/rt4/step4/show_ipv6_route.ref.diff +++ b/tests/topotests/isis_tilfa_topo1/rt4/step4/show_ipv6_route.ref.diff @@ -1,19 +1,23 @@ --- a/rt4/step3/show_ipv6_route.ref +++ b/rt4/step4/show_ipv6_route.ref -@@ -14,9 +14,6 @@ +@@ -13,35 +13,13 @@ + "fib":true, "afi":"ipv6", "interfaceName":"eth-rt2-2", - "active":true, +- "active":true, - "backupIndex":[ - 0 - ], - "labels":[ - 16011 - ] -@@ -26,19 +23,6 @@ +- "labels":[ +- 16011 +- ] ++ "active":true + }, + { + "fib":true, "afi":"ipv6", "interfaceName":"eth-rt2-1", - "active":true, +- "active":true, - "backupIndex":[ - 0 - ], @@ -27,30 +31,38 @@ - "afi":"ipv6", - "interfaceName":"eth-rt5", - "active":true, - "labels":[ - 16011 - ] -@@ -61,9 +45,6 @@ +- "labels":[ +- 16011 +- ] ++ "active":true + } + ] + } +@@ -60,36 +38,13 @@ + "fib":true, "afi":"ipv6", "interfaceName":"eth-rt2-2", - "active":true, +- "active":true, - "backupIndex":[ - 0 - ], - "labels":[ - 3 - ] -@@ -73,24 +54,10 @@ +- "labels":[ +- 3 +- ] ++ "active":true + }, + { + "fib":true, "afi":"ipv6", "interfaceName":"eth-rt2-1", - "active":true, +- "active":true, - "backupIndex":[ - 0 - ], - "labels":[ - 3 - ] - } +- "labels":[ +- 3 +- ] +- } - ], - "backupNexthops":[ - { @@ -61,21 +73,54 @@ - 16031, - 16021 - ] -- } ++ "active":true + } ] } - ], -@@ -149,23 +116,10 @@ +@@ -108,28 +63,19 @@ + "fib":true, + "afi":"ipv6", + "interfaceName":"eth-rt2-2", +- "active":true, +- "labels":[ +- 16031 +- ] ++ "active":true + }, + { + "fib":true, + "afi":"ipv6", + "interfaceName":"eth-rt2-1", +- "active":true, +- "labels":[ +- 16031 +- ] ++ "active":true + }, + { + "fib":true, "afi":"ipv6", "interfaceName":"eth-rt5", - "active":true, +- "active":true, +- "labels":[ +- 16031 +- ] ++ "active":true + } + ] + } +@@ -148,23 +94,7 @@ + "fib":true, + "afi":"ipv6", + "interfaceName":"eth-rt5", +- "active":true, - "backupIndex":[ - 0 - ], - "labels":[ - 3 - ] - } +- "labels":[ +- 3 +- ] +- } - ], - "backupNexthops":[ - { @@ -85,21 +130,22 @@ - "labels":[ - 16051 - ] -- } ++ "active":true + } ] } - ], -@@ -184,23 +138,10 @@ +@@ -183,23 +113,7 @@ + "fib":true, "afi":"ipv6", "interfaceName":"eth-rt6", - "active":true, +- "active":true, - "backupIndex":[ - 0 - ], - "labels":[ - 3 - ] - } +- "labels":[ +- 3 +- ] +- } - ], - "backupNexthops":[ - { @@ -109,7 +155,7 @@ - "labels":[ - 16061 - ] -- } ++ "active":true + } ] } - ] diff --git a/tests/topotests/isis_tilfa_topo1/rt4/step4/show_mpls_table.ref.diff b/tests/topotests/isis_tilfa_topo1/rt4/step4/show_mpls_table.ref.diff index 3dcd36c176..660d2fbde2 100644 --- a/tests/topotests/isis_tilfa_topo1/rt4/step4/show_mpls_table.ref.diff +++ b/tests/topotests/isis_tilfa_topo1/rt4/step4/show_mpls_table.ref.diff @@ -1,19 +1,24 @@ --- a/rt4/step3/show_mpls_table.ref +++ b/rt4/step4/show_mpls_table.ref -@@ -7,26 +7,13 @@ - "type":"SR (IS-IS)", - "outLabel":16010, - "installed":true, +@@ -1,262 +1,2 @@ + { +- "16010":{ +- "inLabel":16010, +- "installed":true, +- "nexthops":[ +- { +- "type":"SR (IS-IS)", +- "outLabel":16010, +- "installed":true, - "nexthop":"10.0.3.2", - "backupIndex":[ - 0 - ] -+ "nexthop":"10.0.3.2" - }, - { - "type":"SR (IS-IS)", - "outLabel":16010, - "installed":true, +- }, +- { +- "type":"SR (IS-IS)", +- "outLabel":16010, +- "installed":true, - "nexthop":"10.0.2.2", - "backupIndex":[ - 0 @@ -25,24 +30,26 @@ - "type":"SR (IS-IS)", - "outLabel":16010, - "nexthop":"10.0.6.5" -+ "nexthop":"10.0.2.2" - } - ] - }, -@@ -38,26 +25,13 @@ - "type":"SR (IS-IS)", - "outLabel":16011, - "installed":true, +- } +- ] +- }, +- "16011":{ +- "inLabel":16011, +- "installed":true, +- "nexthops":[ +- { +- "type":"SR (IS-IS)", +- "outLabel":16011, +- "installed":true, - "interface":"eth-rt2-2", - "backupIndex":[ - 0 - ] -+ "interface":"eth-rt2-2" - }, - { - "type":"SR (IS-IS)", - "outLabel":16011, - "installed":true, +- }, +- { +- "type":"SR (IS-IS)", +- "outLabel":16011, +- "installed":true, - "interface":"eth-rt2-1", - "backupIndex":[ - 0 @@ -54,24 +61,26 @@ - "type":"SR (IS-IS)", - "outLabel":16011, - "interface":"eth-rt5" -+ "interface":"eth-rt2-1" - } - ] - }, -@@ -69,26 +43,13 @@ - "type":"SR (IS-IS)", - "outLabel":3, - "installed":true, +- } +- ] +- }, +- "16020":{ +- "inLabel":16020, +- "installed":true, +- "nexthops":[ +- { +- "type":"SR (IS-IS)", +- "outLabel":3, +- "installed":true, - "nexthop":"10.0.3.2", - "backupIndex":[ - 0 - ] -+ "nexthop":"10.0.3.2" - }, - { - "type":"SR (IS-IS)", - "outLabel":3, - "installed":true, +- }, +- { +- "type":"SR (IS-IS)", +- "outLabel":3, +- "installed":true, - "nexthop":"10.0.2.2", - "backupIndex":[ - 0 @@ -83,24 +92,26 @@ - "type":"SR (IS-IS)", - "outLabel":16030, - "nexthop":"10.0.6.5" -+ "nexthop":"10.0.2.2" - } - ] - }, -@@ -100,26 +61,13 @@ - "type":"SR (IS-IS)", - "outLabel":3, - "installed":true, +- } +- ] +- }, +- "16021":{ +- "inLabel":16021, +- "installed":true, +- "nexthops":[ +- { +- "type":"SR (IS-IS)", +- "outLabel":3, +- "installed":true, - "interface":"eth-rt2-2", - "backupIndex":[ - 0 - ] -+ "interface":"eth-rt2-2" - }, - { - "type":"SR (IS-IS)", - "outLabel":3, - "installed":true, +- }, +- { +- "type":"SR (IS-IS)", +- "outLabel":3, +- "installed":true, - "interface":"eth-rt2-1", - "backupIndex":[ - 0 @@ -112,14 +123,65 @@ - "type":"SR (IS-IS)", - "outLabel":16031, - "interface":"eth-rt5" -+ "interface":"eth-rt2-1" - } - ] - }, -@@ -179,17 +127,7 @@ - "type":"SR (IS-IS)", - "outLabel":3, - "installed":true, +- } +- ] +- }, +- "16030":{ +- "inLabel":16030, +- "installed":true, +- "nexthops":[ +- { +- "type":"SR (IS-IS)", +- "outLabel":16030, +- "installed":true, +- "nexthop":"10.0.3.2" +- }, +- { +- "type":"SR (IS-IS)", +- "outLabel":16030, +- "installed":true, +- "nexthop":"10.0.2.2" +- }, +- { +- "type":"SR (IS-IS)", +- "outLabel":16030, +- "installed":true, +- "nexthop":"10.0.6.5" +- } +- ] +- }, +- "16031":{ +- "inLabel":16031, +- "installed":true, +- "nexthops":[ +- { +- "type":"SR (IS-IS)", +- "outLabel":16031, +- "installed":true, +- "interface":"eth-rt2-2" +- }, +- { +- "type":"SR (IS-IS)", +- "outLabel":16031, +- "installed":true, +- "interface":"eth-rt2-1" +- }, +- { +- "type":"SR (IS-IS)", +- "outLabel":16031, +- "installed":true, +- "interface":"eth-rt5" +- } +- ] +- }, +- "16050":{ +- "inLabel":16050, +- "installed":true, +- "nexthops":[ +- { +- "type":"SR (IS-IS)", +- "outLabel":3, +- "installed":true, - "nexthop":"10.0.6.5", - "backupIndex":[ - 0 @@ -131,14 +193,17 @@ - "type":"SR (IS-IS)", - "outLabel":16050, - "nexthop":"10.0.7.6" -+ "nexthop":"10.0.6.5" - } - ] - }, -@@ -201,17 +139,7 @@ - "type":"SR (IS-IS)", - "outLabel":3, - "installed":true, +- } +- ] +- }, +- "16051":{ +- "inLabel":16051, +- "installed":true, +- "nexthops":[ +- { +- "type":"SR (IS-IS)", +- "outLabel":3, +- "installed":true, - "interface":"eth-rt5", - "backupIndex":[ - 0 @@ -150,14 +215,17 @@ - "type":"SR (IS-IS)", - "outLabel":16051, - "interface":"eth-rt6" -+ "interface":"eth-rt5" - } - ] - }, -@@ -223,17 +151,7 @@ - "type":"SR (IS-IS)", - "outLabel":3, - "installed":true, +- } +- ] +- }, +- "16060":{ +- "inLabel":16060, +- "installed":true, +- "nexthops":[ +- { +- "type":"SR (IS-IS)", +- "outLabel":3, +- "installed":true, - "nexthop":"10.0.7.6", - "backupIndex":[ - 0 @@ -169,14 +237,17 @@ - "type":"SR (IS-IS)", - "outLabel":16060, - "nexthop":"10.0.6.5" -+ "nexthop":"10.0.7.6" - } - ] - }, -@@ -245,17 +163,7 @@ - "type":"SR (IS-IS)", - "outLabel":3, - "installed":true, +- } +- ] +- }, +- "16061":{ +- "inLabel":16061, +- "installed":true, +- "nexthops":[ +- { +- "type":"SR (IS-IS)", +- "outLabel":3, +- "installed":true, - "interface":"eth-rt6", - "backupIndex":[ - 0 @@ -188,7 +259,7 @@ - "type":"SR (IS-IS)", - "outLabel":16061, - "interface":"eth-rt5" -+ "interface":"eth-rt6" - } - ] - } +- } +- ] +- } + } diff --git a/tests/topotests/isis_tilfa_topo1/rt4/step5/show_ip_route.ref.diff b/tests/topotests/isis_tilfa_topo1/rt4/step5/show_ip_route.ref.diff index 484a3147dc..4385df2c36 100644 --- a/tests/topotests/isis_tilfa_topo1/rt4/step5/show_ip_route.ref.diff +++ b/tests/topotests/isis_tilfa_topo1/rt4/step5/show_ip_route.ref.diff @@ -1,19 +1,25 @@ --- a/rt4/step4/show_ip_route.ref +++ b/rt4/step5/show_ip_route.ref -@@ -15,6 +15,9 @@ +@@ -14,14 +14,37 @@ + "ip":"10.0.2.2", "afi":"ipv4", "interfaceName":"eth-rt2-1", - "active":true, +- "active":true ++ "active":true, + "backupIndex":[ + 0 + ], - "labels":[ - 16010 - ] -@@ -25,6 +28,20 @@ ++ "labels":[ ++ 16010 ++ ] + }, + { + "fib":true, + "ip":"10.0.3.2", "afi":"ipv4", "interfaceName":"eth-rt2-2", - "active":true, +- "active":true ++ "active":true, + "backupIndex":[ + 0 + ], @@ -28,30 +34,39 @@ + "afi":"ipv4", + "interfaceName":"eth-rt5", + "active":true, - "labels":[ - 16010 - ] -@@ -48,6 +65,9 @@ ++ "labels":[ ++ 16010 ++ ] + } + ] + } +@@ -41,14 +64,38 @@ + "ip":"10.0.2.2", "afi":"ipv4", "interfaceName":"eth-rt2-1", - "active":true, +- "active":true ++ "active":true, + "backupIndex":[ + 0 + ], - "labels":[ - 3 - ] -@@ -58,10 +78,25 @@ ++ "labels":[ ++ 3 ++ ] + }, + { + "fib":true, + "ip":"10.0.3.2", "afi":"ipv4", "interfaceName":"eth-rt2-2", - "active":true, +- "active":true ++ "active":true, + "backupIndex":[ + 0 + ], - "labels":[ - 3 - ] - } ++ "labels":[ ++ 3 ++ ] ++ } + ], + "backupNexthops":[ + { @@ -63,21 +78,56 @@ + 16030, + 16020 + ] -+ } + } + ] + } +@@ -68,21 +115,30 @@ + "ip":"10.0.2.2", + "afi":"ipv4", + "interfaceName":"eth-rt2-1", +- "active":true ++ "active":true, ++ "labels":[ ++ 16030 ++ ] + }, + { + "fib":true, + "ip":"10.0.3.2", + "afi":"ipv4", + "interfaceName":"eth-rt2-2", +- "active":true ++ "active":true, ++ "labels":[ ++ 16030 ++ ] + }, + { + "fib":true, + "ip":"10.0.6.5", + "afi":"ipv4", + "interfaceName":"eth-rt5", +- "active":true ++ "active":true, ++ "labels":[ ++ 16030 ++ ] + } ] } - ], -@@ -124,10 +159,24 @@ +@@ -102,7 +158,24 @@ + "ip":"10.0.6.5", "afi":"ipv4", "interfaceName":"eth-rt5", - "active":true, +- "active":true ++ "active":true, + "backupIndex":[ + 0 + ], - "labels":[ - 3 - ] - } ++ "labels":[ ++ 3 ++ ] ++ } + ], + "backupNexthops":[ + { @@ -88,21 +138,22 @@ + "labels":[ + 16050 + ] -+ } + } ] } - ], -@@ -147,10 +196,24 @@ +@@ -122,7 +195,24 @@ + "ip":"10.0.7.6", "afi":"ipv4", "interfaceName":"eth-rt6", - "active":true, +- "active":true ++ "active":true, + "backupIndex":[ + 0 + ], - "labels":[ - 3 - ] - } ++ "labels":[ ++ 3 ++ ] ++ } + ], + "backupNexthops":[ + { @@ -113,11 +164,10 @@ + "labels":[ + 16060 + ] -+ } + } ] } - ], -@@ -169,13 +232,27 @@ +@@ -142,13 +232,27 @@ "ip":"10.0.2.2", "afi":"ipv4", "interfaceName":"eth-rt2-1", @@ -146,7 +196,7 @@ "active":true } ] -@@ -191,13 +268,30 @@ +@@ -164,13 +268,30 @@ { "ip":"10.0.2.2", "afi":"ipv4", @@ -179,7 +229,7 @@ } ] } -@@ -213,12 +307,29 @@ +@@ -186,12 +307,29 @@ "ip":"10.0.2.2", "afi":"ipv4", "interfaceName":"eth-rt2-1", @@ -211,7 +261,7 @@ } ] } -@@ -238,6 +349,31 @@ +@@ -211,6 +349,31 @@ "ip":"10.0.6.5", "afi":"ipv4", "interfaceName":"eth-rt5", @@ -243,7 +293,7 @@ "active":true } ] -@@ -258,6 +394,31 @@ +@@ -231,6 +394,31 @@ "ip":"10.0.6.5", "afi":"ipv4", "interfaceName":"eth-rt5", @@ -275,7 +325,7 @@ "active":true } ] -@@ -273,7 +434,18 @@ +@@ -246,7 +434,18 @@ { "ip":"10.0.6.5", "afi":"ipv4", @@ -295,7 +345,7 @@ } ] } -@@ -288,7 +460,18 @@ +@@ -261,7 +460,18 @@ { "ip":"10.0.7.6", "afi":"ipv4", diff --git a/tests/topotests/isis_tilfa_topo1/rt4/step5/show_ipv6_route.ref.diff b/tests/topotests/isis_tilfa_topo1/rt4/step5/show_ipv6_route.ref.diff index 3ad0085120..54a1dc23c5 100644 --- a/tests/topotests/isis_tilfa_topo1/rt4/step5/show_ipv6_route.ref.diff +++ b/tests/topotests/isis_tilfa_topo1/rt4/step5/show_ipv6_route.ref.diff @@ -1,19 +1,24 @@ --- a/rt4/step4/show_ipv6_route.ref +++ b/rt4/step5/show_ipv6_route.ref -@@ -14,6 +14,9 @@ +@@ -13,13 +13,35 @@ + "fib":true, "afi":"ipv6", "interfaceName":"eth-rt2-2", - "active":true, +- "active":true ++ "active":true, + "backupIndex":[ + 0 + ], - "labels":[ - 16011 - ] -@@ -23,6 +26,19 @@ ++ "labels":[ ++ 16011 ++ ] + }, + { + "fib":true, "afi":"ipv6", "interfaceName":"eth-rt2-1", - "active":true, +- "active":true ++ "active":true, + "backupIndex":[ + 0 + ], @@ -27,30 +32,38 @@ + "afi":"ipv6", + "interfaceName":"eth-rt5", + "active":true, - "labels":[ - 16011 - ] -@@ -45,6 +61,9 @@ ++ "labels":[ ++ 16011 ++ ] + } + ] + } +@@ -38,13 +60,36 @@ + "fib":true, "afi":"ipv6", "interfaceName":"eth-rt2-2", - "active":true, +- "active":true ++ "active":true, + "backupIndex":[ + 0 + ], - "labels":[ - 3 - ] -@@ -54,10 +73,24 @@ ++ "labels":[ ++ 3 ++ ] + }, + { + "fib":true, "afi":"ipv6", "interfaceName":"eth-rt2-1", - "active":true, +- "active":true ++ "active":true, + "backupIndex":[ + 0 + ], - "labels":[ - 3 - ] - } ++ "labels":[ ++ 3 ++ ] ++ } + ], + "backupNexthops":[ + { @@ -61,21 +74,54 @@ + 16031, + 16021 + ] -+ } + } ] } - ], -@@ -116,10 +149,23 @@ +@@ -63,19 +108,28 @@ + "fib":true, + "afi":"ipv6", + "interfaceName":"eth-rt2-2", +- "active":true ++ "active":true, ++ "labels":[ ++ 16031 ++ ] + }, + { + "fib":true, + "afi":"ipv6", + "interfaceName":"eth-rt2-1", +- "active":true ++ "active":true, ++ "labels":[ ++ 16031 ++ ] + }, + { + "fib":true, "afi":"ipv6", "interfaceName":"eth-rt5", - "active":true, +- "active":true ++ "active":true, ++ "labels":[ ++ 16031 ++ ] + } + ] + } +@@ -94,7 +148,23 @@ + "fib":true, + "afi":"ipv6", + "interfaceName":"eth-rt5", +- "active":true ++ "active":true, + "backupIndex":[ + 0 + ], - "labels":[ - 3 - ] - } ++ "labels":[ ++ 3 ++ ] ++ } + ], + "backupNexthops":[ + { @@ -85,21 +131,22 @@ + "labels":[ + 16051 + ] -+ } + } ] } - ], -@@ -138,10 +184,23 @@ +@@ -113,7 +183,23 @@ + "fib":true, "afi":"ipv6", "interfaceName":"eth-rt6", - "active":true, +- "active":true ++ "active":true, + "backupIndex":[ + 0 + ], - "labels":[ - 3 - ] - } ++ "labels":[ ++ 3 ++ ] ++ } + ], + "backupNexthops":[ + { @@ -109,7 +156,6 @@ + "labels":[ + 16061 + ] -+ } + } ] } - ] diff --git a/tests/topotests/isis_tilfa_topo1/rt4/step5/show_mpls_table.ref.diff b/tests/topotests/isis_tilfa_topo1/rt4/step5/show_mpls_table.ref.diff index 20e363375b..fb6a119281 100644 --- a/tests/topotests/isis_tilfa_topo1/rt4/step5/show_mpls_table.ref.diff +++ b/tests/topotests/isis_tilfa_topo1/rt4/step5/show_mpls_table.ref.diff @@ -1,20 +1,24 @@ --- a/rt4/step4/show_mpls_table.ref +++ b/rt4/step5/show_mpls_table.ref -@@ -7,13 +7,26 @@ - "type":"SR (IS-IS)", - "outLabel":16010, - "installed":true, -- "nexthop":"10.0.3.2" +@@ -1,2 +1,262 @@ + { ++ "16010":{ ++ "inLabel":16010, ++ "installed":true, ++ "nexthops":[ ++ { ++ "type":"SR (IS-IS)", ++ "outLabel":16010, ++ "installed":true, + "nexthop":"10.0.3.2", + "backupIndex":[ + 0 + ] - }, - { - "type":"SR (IS-IS)", - "outLabel":16010, - "installed":true, -- "nexthop":"10.0.2.2" ++ }, ++ { ++ "type":"SR (IS-IS)", ++ "outLabel":16010, ++ "installed":true, + "nexthop":"10.0.2.2", + "backupIndex":[ + 0 @@ -26,24 +30,26 @@ + "type":"SR (IS-IS)", + "outLabel":16010, + "nexthop":"10.0.6.5" - } - ] - }, -@@ -25,13 +38,26 @@ - "type":"SR (IS-IS)", - "outLabel":16011, - "installed":true, -- "interface":"eth-rt2-2" ++ } ++ ] ++ }, ++ "16011":{ ++ "inLabel":16011, ++ "installed":true, ++ "nexthops":[ ++ { ++ "type":"SR (IS-IS)", ++ "outLabel":16011, ++ "installed":true, + "interface":"eth-rt2-2", + "backupIndex":[ + 0 + ] - }, - { - "type":"SR (IS-IS)", - "outLabel":16011, - "installed":true, -- "interface":"eth-rt2-1" ++ }, ++ { ++ "type":"SR (IS-IS)", ++ "outLabel":16011, ++ "installed":true, + "interface":"eth-rt2-1", + "backupIndex":[ + 0 @@ -55,24 +61,26 @@ + "type":"SR (IS-IS)", + "outLabel":16011, + "interface":"eth-rt5" - } - ] - }, -@@ -43,13 +69,26 @@ - "type":"SR (IS-IS)", - "outLabel":3, - "installed":true, -- "nexthop":"10.0.3.2" ++ } ++ ] ++ }, ++ "16020":{ ++ "inLabel":16020, ++ "installed":true, ++ "nexthops":[ ++ { ++ "type":"SR (IS-IS)", ++ "outLabel":3, ++ "installed":true, + "nexthop":"10.0.3.2", + "backupIndex":[ + 0 + ] - }, - { - "type":"SR (IS-IS)", - "outLabel":3, - "installed":true, -- "nexthop":"10.0.2.2" ++ }, ++ { ++ "type":"SR (IS-IS)", ++ "outLabel":3, ++ "installed":true, + "nexthop":"10.0.2.2", + "backupIndex":[ + 0 @@ -84,24 +92,26 @@ + "type":"SR (IS-IS)", + "outLabel":16030, + "nexthop":"10.0.6.5" - } - ] - }, -@@ -61,13 +100,26 @@ - "type":"SR (IS-IS)", - "outLabel":3, - "installed":true, -- "interface":"eth-rt2-2" ++ } ++ ] ++ }, ++ "16021":{ ++ "inLabel":16021, ++ "installed":true, ++ "nexthops":[ ++ { ++ "type":"SR (IS-IS)", ++ "outLabel":3, ++ "installed":true, + "interface":"eth-rt2-2", + "backupIndex":[ + 0 + ] - }, - { - "type":"SR (IS-IS)", - "outLabel":3, - "installed":true, -- "interface":"eth-rt2-1" ++ }, ++ { ++ "type":"SR (IS-IS)", ++ "outLabel":3, ++ "installed":true, + "interface":"eth-rt2-1", + "backupIndex":[ + 0 @@ -113,14 +123,65 @@ + "type":"SR (IS-IS)", + "outLabel":16031, + "interface":"eth-rt5" - } - ] - }, -@@ -127,7 +179,17 @@ - "type":"SR (IS-IS)", - "outLabel":3, - "installed":true, -- "nexthop":"10.0.6.5" ++ } ++ ] ++ }, ++ "16030":{ ++ "inLabel":16030, ++ "installed":true, ++ "nexthops":[ ++ { ++ "type":"SR (IS-IS)", ++ "outLabel":16030, ++ "installed":true, ++ "nexthop":"10.0.3.2" ++ }, ++ { ++ "type":"SR (IS-IS)", ++ "outLabel":16030, ++ "installed":true, ++ "nexthop":"10.0.2.2" ++ }, ++ { ++ "type":"SR (IS-IS)", ++ "outLabel":16030, ++ "installed":true, ++ "nexthop":"10.0.6.5" ++ } ++ ] ++ }, ++ "16031":{ ++ "inLabel":16031, ++ "installed":true, ++ "nexthops":[ ++ { ++ "type":"SR (IS-IS)", ++ "outLabel":16031, ++ "installed":true, ++ "interface":"eth-rt2-2" ++ }, ++ { ++ "type":"SR (IS-IS)", ++ "outLabel":16031, ++ "installed":true, ++ "interface":"eth-rt2-1" ++ }, ++ { ++ "type":"SR (IS-IS)", ++ "outLabel":16031, ++ "installed":true, ++ "interface":"eth-rt5" ++ } ++ ] ++ }, ++ "16050":{ ++ "inLabel":16050, ++ "installed":true, ++ "nexthops":[ ++ { ++ "type":"SR (IS-IS)", ++ "outLabel":3, ++ "installed":true, + "nexthop":"10.0.6.5", + "backupIndex":[ + 0 @@ -132,14 +193,17 @@ + "type":"SR (IS-IS)", + "outLabel":16050, + "nexthop":"10.0.7.6" - } - ] - }, -@@ -139,7 +201,17 @@ - "type":"SR (IS-IS)", - "outLabel":3, - "installed":true, -- "interface":"eth-rt5" ++ } ++ ] ++ }, ++ "16051":{ ++ "inLabel":16051, ++ "installed":true, ++ "nexthops":[ ++ { ++ "type":"SR (IS-IS)", ++ "outLabel":3, ++ "installed":true, + "interface":"eth-rt5", + "backupIndex":[ + 0 @@ -151,14 +215,17 @@ + "type":"SR (IS-IS)", + "outLabel":16051, + "interface":"eth-rt6" - } - ] - }, -@@ -151,7 +223,17 @@ - "type":"SR (IS-IS)", - "outLabel":3, - "installed":true, -- "nexthop":"10.0.7.6" ++ } ++ ] ++ }, ++ "16060":{ ++ "inLabel":16060, ++ "installed":true, ++ "nexthops":[ ++ { ++ "type":"SR (IS-IS)", ++ "outLabel":3, ++ "installed":true, + "nexthop":"10.0.7.6", + "backupIndex":[ + 0 @@ -170,14 +237,17 @@ + "type":"SR (IS-IS)", + "outLabel":16060, + "nexthop":"10.0.6.5" - } - ] - }, -@@ -163,7 +245,17 @@ - "type":"SR (IS-IS)", - "outLabel":3, - "installed":true, -- "interface":"eth-rt6" ++ } ++ ] ++ }, ++ "16061":{ ++ "inLabel":16061, ++ "installed":true, ++ "nexthops":[ ++ { ++ "type":"SR (IS-IS)", ++ "outLabel":3, ++ "installed":true, + "interface":"eth-rt6", + "backupIndex":[ + 0 @@ -189,6 +259,7 @@ + "type":"SR (IS-IS)", + "outLabel":16061, + "interface":"eth-rt5" - } - ] - } ++ } ++ ] ++ } + }