From: Carmine Scarpitta Date: Thu, 13 Feb 2025 10:02:59 +0000 (+0100) Subject: staticd: Extend `static_zebra_srv6_sid_install` to install SRv6 uA SIDs X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=ae6fb9196a92820bfcf1bfcacfd3c272d778cf70;p=matthieu%2Ffrr.git 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 --- 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: