Files
open5gs/src
Sukchan Lee 9d8e94f176 [SGWC] Prevent crash on PFCP Session Modification with no bearers (#4073)
In some handover scenarios, `sgwc_sxa_build_bearer_to_modify_list()` could
be invoked when there were no bearers to modify. This led to an assertion
failure:

    Assertion `num_of_remove_pdr + num_of_remove_far + ...` failed

This patch adds explicit checks on `sess->bearer_list` before building or
sending PFCP Session Modification Requests. If no bearers are present, the
request is skipped and an error is logged with IMSI/APN/TEID context
instead of aborting the process.

Changes include:
- Added `ogs_list_count(&sess->bearer_list)` checks in
  `pfcp-path.c`, `s11-handler.c`, `s5c-handler.c`, and `sxa-handler.c`.
- Gracefully skip SMR when bearer list is empty in
  Delete Indirect Data Forwarding Tunnel Request handling.
- Log diagnostic information (IMSI, APN, TEIDs) when no bearer is found.

This prevents SGWC from crashing under DEBUG logging and concurrent HO
scenarios, and allows multiple handover sessions to proceed more stably.
2025-09-22 20:48:07 +09:00
..
2025-05-10 12:08:47 +09:00
2025-06-30 10:02:57 +09:00
2025-06-30 10:02:57 +09:00
2025-06-30 10:02:57 +09:00
2025-07-12 08:13:15 +09:00
2025-04-06 18:36:57 +09:00