summaryrefslogtreecommitdiff
path: root/staticd
diff options
context:
space:
mode:
authorCarmine Scarpitta <cscarpit@cisco.com>2025-02-13 11:02:59 +0100
committerCarmine Scarpitta <cscarpit@cisco.com>2025-02-26 07:19:52 +0100
commitae6fb9196a92820bfcf1bfcacfd3c272d778cf70 (patch)
treee7c80bc2d6a227586eb7bcf069d4ccbf21a0dcf6 /staticd
parentcc84e522810542105d9b358b3cbefe4fdf694c5c (diff)
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>
Diffstat (limited to 'staticd')
-rw-r--r--staticd/static_zebra.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/staticd/static_zebra.c b/staticd/static_zebra.c
index ec425a4afc..83d123e655 100644
--- a/staticd/static_zebra.c
+++ b/staticd/static_zebra.c
@@ -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: