]> git.puffer.fish Git - matthieu/frr.git/commitdiff
staticd: Extend `static_zebra_srv6_sid_install` to install SRv6 uA SIDs
authorCarmine Scarpitta <cscarpit@cisco.com>
Thu, 13 Feb 2025 10:02:59 +0000 (11:02 +0100)
committerCarmine Scarpitta <cscarpit@cisco.com>
Wed, 26 Feb 2025 06:19:52 +0000 (07:19 +0100)
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>
staticd/static_zebra.c

index ec425a4afcd4e363e77f730a647dc0b9994f1c2a..83d123e6555cf604d1db17c850a493ff91292da5 100644 (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: