Skip to content

Conversation

cscarpitta
Copy link
Contributor

When a daemon asks SID Manager to release a SID, SID Manager calls static_zebra_srv6_sid_notify() to notify the daemon if the SID release was successful or there was an error.

Currently, when calling static_zebra_srv6_sid_notify(), SID Manager does not provide the SID value, which makes difficult for the daemon to figure out which SID the notification refers to.

The problem can be clearly observed by enabling debug static srv6, removing a SID in STATIC and looking at STATIC logs.

Before the fix, STATIC receives a notify message from SID Manager that does not contain a sid_value "::" :

2025/06/07 10:15:32.204664 STATIC: [J9AAH-6B3EE] static_zebra_srv6_sid_notify: received SRv6 SID notify: ctx End.DT6 vrf_id 4 sid_value :: sid_func 0 note ZAPI_SRV6_SID_RELEASED
2025/06/07 10:15:32.204691 STATIC: [HMKQ2-9A3HV] static_zebra_srv6_sid_notify: SRv6 SID :: End.DT6 vrf_id 4: RELEASED

After the fix, the notify message provides an indication of which sid_value has been released "fcbb:bbbb:1:fe20::" :

2025/06/07 10:13:35.840414 STATIC: [J9AAH-6B3EE] static_zebra_srv6_sid_notify: received SRv6 SID notify: ctx End.DT6 vrf_id 4 sid_value fcbb:bbbb:1:fe20:: sid_func 0 note ZAPI_SRV6_SID_RELEASED
2025/06/07 10:13:35.840445 STATIC: [HMKQ2-9A3HV] static_zebra_srv6_sid_notify: SRv6 SID fcbb:bbbb:1:fe20:: End.DT6 vrf_id 4: RELEASED

When a daemon asks SID Manager to release a SID, SID Manager calls
static_zebra_srv6_sid_notify() to notify the daemon if the SID release
was successful or there was an error.

Currently, when calling static_zebra_srv6_sid_notify(), SID Manager
does not provide the SID value, which makes difficult for the daemon to
figure out which SID the notification refers to.

The problem can be clearly observed by enabling `debug static srv6`,
removing a SID in STATIC and looking at STATIC logs.

Before the change, STATIC receives a notify message from SID Manager
that does not contain a sid_value "::" :

2025/06/07 10:15:32.204664 STATIC: [J9AAH-6B3EE] static_zebra_srv6_sid_notify: received SRv6 SID notify: ctx End.DT6 vrf_id 4 sid_value :: sid_func 0 note ZAPI_SRV6_SID_RELEASED
2025/06/07 10:15:32.204691 STATIC: [HMKQ2-9A3HV] static_zebra_srv6_sid_notify: SRv6 SID :: End.DT6 vrf_id 4: RELEASED

After the change, the notify message provides an indication of which
sid_value has been released "fcbb:bbbb:1:fe20::" :

2025/06/07 10:13:35.840414 STATIC: [J9AAH-6B3EE] static_zebra_srv6_sid_notify: received SRv6 SID notify: ctx End.DT6 vrf_id 4 sid_value fcbb:bbbb:1:fe20:: sid_func 0 note ZAPI_SRV6_SID_RELEASED
2025/06/07 10:13:35.840445 STATIC: [HMKQ2-9A3HV] static_zebra_srv6_sid_notify: SRv6 SID fcbb:bbbb:1:fe20:: End.DT6 vrf_id 4: RELEASED

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
@cscarpitta cscarpitta force-pushed the fix/fix_srv6_sid_release_notify branch from 721f0d4 to dccb0f4 Compare June 7, 2025 10:42
Copy link
Member

@ton31337 ton31337 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ton31337
Copy link
Member

ton31337 commented Jun 7, 2025

@Mergifyio backport stable/10.3 stable/10.2

Copy link

mergify bot commented Jun 7, 2025

backport stable/10.3 stable/10.2

✅ Backports have been created

@ton31337 ton31337 merged commit f3a33d7 into FRRouting:master Jun 7, 2025
13 checks passed
ton31337 added a commit that referenced this pull request Jun 9, 2025
zebra: Provide SID value when sending SRv6 SID release notify message (backport #18971)
ton31337 added a commit that referenced this pull request Jun 9, 2025
zebra: Provide SID value when sending SRv6 SID release notify message (backport #18971)
ton31337 added a commit to opensourcerouting/frr that referenced this pull request Aug 2, 2025
* bgpd: correct no form commands (backport FRRouting#18911)
* bgpd: fix to show exist/non-exist-map in 'show run' properly FRRouting#18853
* redhat: make FRR RPM build to work on RedHat 10 (backport FRRouting#18920)
* build: check for libunwind.h, not unwind.h (backport FRRouting#18912)
* bgpd: use AS4B format for BGP loc-rib messages. (backport FRRouting#18936)
* bgpd: fix for the validity and the presence of prefixes in the BGP VPN table. (backport FRRouting#17370)
* bgpd: Force adj-rib-out updates if MRAI is kicked in (backport FRRouting#18959)
* zebra: Provide SID value when sending SRv6 SID release notify message (backport FRRouting#18971)
* bgpd: Fix crash when fetching statistics for bgp instance (backport FRRouting#19003)
* nhrpd: fix crash when accessing invalid memory zone (backport FRRouting#18994)
* zebra: Initialize RB tree for router tables (backport FRRouting#19049)
* zebra: fix null pointer dereference in zebra_evpn_sync_neigh_del (backport FRRouting#19054)
* zebra: fix stale NHG in kernel (backport FRRouting#18899)
* bgpd: Fix incorrect stripping of transitive extended communities (backport FRRouting#19065)
* lib: Fix no on-match goto NUM command (backport FRRouting#19108)
* bgpd: Fix extended community check for IP non-transitive type (backport FRRouting#19097)
* bgpd: Fix DEREF_OF_NULL.EX.COND in bgp_updgrp_packet (backport FRRouting#19126)
* lib: revert addition of vtysh_flush() call in vty_out() (backport FRRouting#19109)
* bgpd: Extract link bandwidth value from extcommunity before using for WCMP (backport FRRouting#19165)
* Use ipv4 class E addresses (240.0.0.0/4) as connected routes by default (backport FRRouting#18095)
* bfdd: Set bfd.LocalDiag when transitioning to AdminDown (backport FRRouting#18592)
* zebra: clean up a json object leak (backport FRRouting#19192)
* bgpd: Do not try to reuse freed route-maps (backport FRRouting#19191)
* lib: fix routemap crash (backport FRRouting#19127)
* bgpd: initialize local variable (backport FRRouting#19233)
* ospfd: Use after free cleanup of lsa (backport FRRouting#19224)
* vtysh: copy config from file should actually apply (backport FRRouting#19242)
* bgpd : Fix compilation error in bgpd module: Update TP_ARGS for bgp (backport FRRouting#19266)
* bgpd: Ensure addpath does not withdraw selected route in some situations (backport FRRouting#19210)
* lib, zebra: mark singleton nexthops inactive/active on link state changes for wecmp (backport FRRouting#18947)
* eigrp: validate hello packets and tlvs better (backport FRRouting#19251)
* bgpd: [GR] fixed selectionDeferralTimer to display select_defer_time val FRRouting#19283

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
ton31337 added a commit to opensourcerouting/frr that referenced this pull request Aug 2, 2025
* bgpd: correct no form commands (backport FRRouting#18911)
* build: check for libunwind.h, not unwind.h (backport FRRouting#18912)
* redhat: make FRR RPM build to work on RedHat 10 (backport FRRouting#18920)
* bgpd: use AS4B format for BGP loc-rib messages. (backport FRRouting#18936)
* bgpd: Force adj-rib-out updates if MRAI is kicked in (backport FRRouting#18959)
* zebra: Provide SID value when sending SRv6 SID release notify message (backport FRRouting#18971)
* nhrpd: fix crash when accessing invalid memory zone (backport FRRouting#18994)
* lib: Fix no on-match goto NUM command (backport FRRouting#19108)
* bgpd: Fix DEREF_OF_NULL.EX.COND in bgp_updgrp_packet (backport FRRouting#19126)
* bgpd: Extract link bandwidth value from extcommunity before using for WCMP (backport FRRouting#19165)
* bfdd: Set bfd.LocalDiag when transitioning to AdminDown (backport FRRouting#18592)
* bgpd: Do not try to reuse freed route-maps (backport FRRouting#19191)
* lib: fix routemap crash (backport FRRouting#19127)
* lib, zebra: mark singleton nexthops inactive/active on link state changes for wecmp (backport FRRouting#18947)
* bgpd: [GR] fixed selectionDeferralTimer to display select_defer_time val FRRouting#19284

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants