diff options
| author | Carmine Scarpitta <cscarpit@cisco.com> | 2025-02-13 11:03:18 +0100 | 
|---|---|---|
| committer | Carmine Scarpitta <cscarpit@cisco.com> | 2025-02-26 07:19:52 +0100 | 
| commit | 95abf9d678806ff7bd9eeee8da6302ddb55f1773 (patch) | |
| tree | 858a23a90b4b878a26f9631bf576299d7061b5e9 /staticd | |
| parent | ae6fb9196a92820bfcf1bfcacfd3c272d778cf70 (diff) | |
staticd: Extend `static_zebra_srv6_sid_uninstall` to uninstall SRv6 uA SIDs
This commit extends the `static_zebra_srv6_sid_uninstall` function to
allow staticd to remove SRv6 uA SIDs from the zebra RIB.
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Diffstat (limited to 'staticd')
| -rw-r--r-- | staticd/static_zebra.c | 10 | 
1 files changed, 9 insertions, 1 deletions
diff --git a/staticd/static_zebra.c b/staticd/static_zebra.c index 83d123e655..9a5e0efc4d 100644 --- a/staticd/static_zebra.c +++ b/staticd/static_zebra.c @@ -842,12 +842,20 @@ void static_zebra_srv6_sid_uninstall(struct static_srv6_sid *sid)  			return;  		}  		break; +	case SRV6_ENDPOINT_BEHAVIOR_END_X_NEXT_CSID: +		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; +		} +		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:  | 
