staticd: Extend static_zebra_srv6_sid_install to install SRv6 uA SIDs

This commit extends the `static_zebra_srv6_sid_install` function to
allow staticd to install SRv6 uA SIDs into the zebra RIB.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
This commit is contained in:
Carmine Scarpitta 2025-02-13 11:02:59 +01:00
parent cc84e52281
commit ae6fb9196a

View File

@ -702,12 +702,24 @@ void static_zebra_srv6_sid_install(struct static_srv6_sid *sid)
return;
}
break;
case SRV6_ENDPOINT_BEHAVIOR_END_X_NEXT_CSID:
action = ZEBRA_SEG6_LOCAL_ACTION_END_X;
ctx.nh6 = sid->attributes.nh6;
ifp = if_lookup_by_name(sid->attributes.ifname, VRF_DEFAULT);
if (!ifp) {
zlog_warn("Failed to install SID %pFX: failed to get interface %s",
&sid->addr, sid->attributes.ifname);
return;
}
SET_SRV6_FLV_OP(ctx.flv.flv_ops, ZEBRA_SEG6_LOCAL_FLV_OP_NEXT_CSID);
ctx.flv.lcblock_len = sid->locator->block_bits_length;
ctx.flv.lcnode_func_len = sid->locator->node_bits_length;
break;
case SRV6_ENDPOINT_BEHAVIOR_END_PSP_USD:
case SRV6_ENDPOINT_BEHAVIOR_END_NEXT_CSID_PSP_USD:
case SRV6_ENDPOINT_BEHAVIOR_END_X:
case SRV6_ENDPOINT_BEHAVIOR_END_X_PSP:
case SRV6_ENDPOINT_BEHAVIOR_END_X_PSP_USD:
case SRV6_ENDPOINT_BEHAVIOR_END_X_NEXT_CSID:
case SRV6_ENDPOINT_BEHAVIOR_END_X_NEXT_CSID_PSP:
case SRV6_ENDPOINT_BEHAVIOR_END_X_NEXT_CSID_PSP_USD:
case SRV6_ENDPOINT_BEHAVIOR_OPAQUE: