mirror of
https://github.com/open5gs/open5gs.git
synced 2026-04-26 10:30:41 +00:00
This patch addresses a potential subscription_data pool exhaustion issue observed during repeated NF re-registration with the NRF. Two improvements are introduced: 1) Prevent duplicate NF status subscriptions Before sending a new NF status subscription request, the code now checks whether an equivalent subscription already exists in the local subscription_data list. If a matching subscription (based on req_nf_instance_id and subscr_cond) is found and it is not already marked with DELETE_SENT, the new subscription request is skipped. This prevents repeated subscription creation during re-registration loops. 2) Ensure local cleanup after DELETE response When handling HTTP DELETE responses for NF status subscriptions, the local subscription_data entry is now removed regardless of the response status. Previously, the entry was only removed on HTTP 204 (No Content), which could leave stale entries in the local list when the NRF returned other statuses (e.g., 404). Keeping stale entries could lead to unbounded growth of subscription_data and eventual pool exhaustion. Additionally, successful DELETE operations are logged to improve debugging visibility. This change affects all NF state machines that handle subscription DELETE responses (AMF, AUSF, BSF, NSSF, PCF, SCP, SEPP, SMF, UDM, UDR, and AF test code). Issues: #4207 |
||
|---|---|---|
| .. | ||
| af-sm.c | ||
| af-sm.h | ||
| context.c | ||
| context.h | ||
| event.c | ||
| event.h | ||
| init.c | ||
| init.h | ||
| local.c | ||
| local.h | ||
| meson.build | ||
| nbsf-build.c | ||
| nbsf-build.h | ||
| nbsf-handler.c | ||
| nbsf-handler.h | ||
| nnrf-handler.c | ||
| nnrf-handler.h | ||
| npcf-build.c | ||
| npcf-build.h | ||
| npcf-handler.c | ||
| npcf-handler.h | ||
| sbi-path.c | ||
| sbi-path.h | ||