mirror of
https://github.com/open5gs/open5gs.git
synced 2025-10-23 07:41:57 +00:00
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.