From be4eb370dbdf82df53717cfec55819fa4d8f8ec3 Mon Sep 17 00:00:00 2001 From: Dmytro Shytyi Date: Tue, 12 Nov 2024 15:24:57 +0100 Subject: [PATCH] isisd: properly display srv6 algorithm When the segment-routing ipv6 is configured, the SPF algoritm shows S-SPF is used: > rt1# show isis segment-routing srv6 node > Area 1: > IS-IS L1 SRv6-Nodes: > > System ID Algorithm SRH Max SL SRH Max End Pop SRH Max H.encaps SRH Max End D > ----------------------------------------------------------------------------------------- > 0000.0000.0001 S-SPF 3 3 2 5 Actually, the segment-routing ipv6 algo capabilities (SPF) are rewritten. Don't rewrite the algo[0]. > rt1# show isis segment-routing srv6 node > Area 1: > IS-IS L1 SRv6-Nodes: > > System ID Algorithm SRH Max SL SRH Max End Pop SRH Max H.encaps SRH Max End D > ----------------------------------------------------------------------------------------- > 0000.0000.0001 SPF 3 3 2 5 Fixes: ("78774bbcd51b") isisd: add isis flex-algo lsp advertisement Signed-off-by: Dmytro Shytyi --- isisd/isis_tlvs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/isisd/isis_tlvs.c b/isisd/isis_tlvs.c index b5caf396c17c..18b13547a5c5 100644 --- a/isisd/isis_tlvs.c +++ b/isisd/isis_tlvs.c @@ -7993,7 +7993,7 @@ struct isis_router_cap *isis_tlvs_init_router_capability(struct isis_tlvs *tlvs) tlvs->router_cap = XCALLOC(MTYPE_ISIS_TLV, sizeof(*tlvs->router_cap)); /* init SR algo list content to the default value */ - for (int i = 0; i < SR_ALGORITHM_COUNT; i++) + for (int i = 1; i < SR_ALGORITHM_COUNT; i++) tlvs->router_cap->algo[i] = SR_ALGORITHM_UNSET; return tlvs->router_cap;