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 <dmytro.shytyi@6wind.com>
This commit is contained in:
Dmytro Shytyi 2024-11-12 15:24:57 +01:00
parent 1abe911c5b
commit be4eb370db
No known key found for this signature in database
GPG Key ID: 718B775A0DC16C29

View File

@ -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)); tlvs->router_cap = XCALLOC(MTYPE_ISIS_TLV, sizeof(*tlvs->router_cap));
/* init SR algo list content to the default value */ /* 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; tlvs->router_cap->algo[i] = SR_ALGORITHM_UNSET;
return tlvs->router_cap; return tlvs->router_cap;