mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 22:50:14 +00:00
Merge pull request #17979 from cscarpitta/fix/fix_staticd_sid_notify
staticd: Fix NULL pointer dereference when receiving `ZAPI_SRV6_SID_RELEASED` notification
This commit is contained in:
commit
4f43a33d42
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user