diff options
Diffstat (limited to 'staticd')
| -rw-r--r-- | staticd/static_vty.c | 4 | ||||
| -rw-r--r-- | staticd/static_zebra.c | 13 | 
2 files changed, 15 insertions, 2 deletions
diff --git a/staticd/static_vty.c b/staticd/static_vty.c index ed2805d3ea..f93e81e8dc 100644 --- a/staticd/static_vty.c +++ b/staticd/static_vty.c @@ -1273,8 +1273,8 @@ DEFPY_YANG(no_srv6_sid, no_srv6_sid_cmd,  {  	char xpath[XPATH_MAXLEN + 37]; -	snprintf(xpath, sizeof(xpath), FRR_STATIC_SRV6_INFO_KEY_XPATH, "frr-staticd:staticd", -		 "staticd", VRF_DEFAULT_NAME); +	snprintf(xpath, sizeof(xpath), FRR_STATIC_SRV6_SID_KEY_XPATH, "frr-staticd:staticd", +		 "staticd", VRF_DEFAULT_NAME, sid_str);  	nb_cli_enqueue_change(vty, xpath, NB_OP_DESTROY, NULL); diff --git a/staticd/static_zebra.c b/staticd/static_zebra.c index 057193aa08..6da2dfec90 100644 --- a/staticd/static_zebra.c +++ b/staticd/static_zebra.c @@ -1169,6 +1169,19 @@ static int static_zebra_srv6_sid_notify(ZAPI_CALLBACK_ARGS)  		DEBUGD(&static_dbg_srv6, "%s: SRv6 SID %pI6 %s: RELEASED", __func__, &sid_addr,  		       srv6_sid_ctx2str(buf, sizeof(buf), &ctx)); +		for (ALL_LIST_ELEMENTS_RO(srv6_sids, node, sid)) { +			if (IPV6_ADDR_SAME(&sid->addr.prefix, &sid_addr)) { +				found = true; +				break; +			} +		} + +		if (!found || !sid) { +			zlog_err("SRv6 SID %pI6 %s: not found", &sid_addr, +				 srv6_sid_ctx2str(buf, sizeof(buf), &ctx)); +			return 0; +		} +  		UNSET_FLAG(sid->flags, STATIC_FLAG_SRV6_SID_VALID);  		break;  | 
