]> git.puffer.fish Git - matthieu/frr.git/commitdiff
isisd: properly display srv6 algorithm
authorDmytro Shytyi <dmytro.shytyi@6wind.com>
Tue, 12 Nov 2024 14:24:57 +0000 (15:24 +0100)
committerDmytro Shytyi <dmytro.shytyi@6wind.com>
Tue, 12 Nov 2024 14:24:57 +0000 (15:24 +0100)
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>
isisd/isis_tlvs.c

index b5caf396c17c6dc0c0f34c429e7270fbc7b17c90..18b13547a5c59aebc2dd7cb26263a02e251fbbc3 100644 (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));
 
        /* 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;