mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-26 04:54:44 +00:00
Merge pull request #17964 from cscarpitta/fix/fix-srv6-sid-manager
Fix SRv6 SID Manager
This commit is contained in:
commit
91ebab35f2
@ -1,4 +1,39 @@
|
|||||||
{
|
{
|
||||||
|
"fcbb:bbbb:1::/48": [
|
||||||
|
{
|
||||||
|
"prefix": "fcbb:bbbb:1::/48",
|
||||||
|
"prefixLen": 48,
|
||||||
|
"protocol": "static",
|
||||||
|
"vrfId": 0,
|
||||||
|
"vrfName": "default",
|
||||||
|
"selected": true,
|
||||||
|
"destSelected": true,
|
||||||
|
"distance": 1,
|
||||||
|
"metric": 0,
|
||||||
|
"installed": true,
|
||||||
|
"table": 254,
|
||||||
|
"internalStatus": 16,
|
||||||
|
"internalFlags": 9,
|
||||||
|
"internalNextHopNum": 1,
|
||||||
|
"internalNextHopActiveNum": 1,
|
||||||
|
"nexthops": [
|
||||||
|
{
|
||||||
|
"flags": 3,
|
||||||
|
"fib": true,
|
||||||
|
"directlyConnected": true,
|
||||||
|
"interfaceName": "sr0",
|
||||||
|
"active": true,
|
||||||
|
"weight": 1,
|
||||||
|
"seg6local": {
|
||||||
|
"action": "End"
|
||||||
|
},
|
||||||
|
"seg6localContext": {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
"fcbb:bbbb:1:fe10::/64": [
|
"fcbb:bbbb:1:fe10::/64": [
|
||||||
{
|
{
|
||||||
"prefix": "fcbb:bbbb:1:fe10::/64",
|
"prefix": "fcbb:bbbb:1:fe10::/64",
|
||||||
|
@ -8,6 +8,7 @@ segment-routing
|
|||||||
!
|
!
|
||||||
!
|
!
|
||||||
static-sids
|
static-sids
|
||||||
|
sid fcbb:bbbb:1::/48 locator MAIN behavior uN
|
||||||
sid fcbb:bbbb:1:fe10::/64 locator MAIN behavior uDT4 vrf Vrf10
|
sid fcbb:bbbb:1:fe10::/64 locator MAIN behavior uDT4 vrf Vrf10
|
||||||
sid fcbb:bbbb:1:fe20::/64 locator MAIN behavior uDT6 vrf Vrf20
|
sid fcbb:bbbb:1:fe20::/64 locator MAIN behavior uDT6 vrf Vrf20
|
||||||
sid fcbb:bbbb:1:fe30::/64 locator MAIN behavior uDT46 vrf Vrf30
|
sid fcbb:bbbb:1:fe30::/64 locator MAIN behavior uDT46 vrf Vrf30
|
||||||
|
@ -1547,9 +1547,26 @@ static int get_srv6_sid_explicit(struct zebra_srv6_sid **sid,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ctx->behavior == ZEBRA_SEG6_LOCAL_ACTION_END) {
|
if (ctx->behavior == ZEBRA_SEG6_LOCAL_ACTION_END) {
|
||||||
zlog_err("%s: invalid SM request arguments: explicit SID allocation not allowed for End/uN behavior",
|
zctx = zebra_srv6_sid_ctx_alloc();
|
||||||
__func__);
|
zctx->ctx = *ctx;
|
||||||
return -1;
|
|
||||||
|
*sid = zebra_srv6_sid_alloc(zctx, sid_value, locator, block, sid_func,
|
||||||
|
SRV6_SID_ALLOC_MODE_EXPLICIT);
|
||||||
|
if (!(*sid)) {
|
||||||
|
flog_err(EC_ZEBRA_SM_CANNOT_ASSIGN_SID,
|
||||||
|
"%s: failed to create SRv6 SID %s (%pI6)", __func__,
|
||||||
|
srv6_sid_ctx2str(buf, sizeof(buf), ctx), sid_value);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
(*sid)->ctx = zctx;
|
||||||
|
zctx->sid = *sid;
|
||||||
|
listnode_add(srv6->sids, zctx);
|
||||||
|
|
||||||
|
if (IS_ZEBRA_DEBUG_SRV6)
|
||||||
|
zlog_debug("%s: allocated explicit SRv6 SID %pI6 for context %s", __func__,
|
||||||
|
&(*sid)->value, srv6_sid_ctx2str(buf, sizeof(buf), ctx));
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Allocate an explicit SID function for the SID */
|
/* Allocate an explicit SID function for the SID */
|
||||||
|
Loading…
Reference in New Issue
Block a user