mirror of
https://github.com/open5gs/open5gs.git
synced 2025-10-22 23:31:57 +00:00
Previously, TAU procedure validated EPS Bearer Context Status (BCS) only when active_flag == 0. When active_flag == 1, the MME skipped BCS validation and sent TAU ACCEPT directly via InitialContextSetup. This patch unifies BCS validation so both active_flag paths handle bearer mismatches consistently. It also selects the correct S1AP procedure (InitialContextSetup or DownlinkNASTransport) depending on the UE active state. Changes: - emm-sm.c / sgsap-handler.c: * Always check EPS_BEARER_CONTEXT_STATUS_TYPE presence. * Invoke mme_send_delete_session_or_tau_accept() for both active_flag=0 and 1. * Send TAU ACCEPT directly only when BCS is not present. - mme-path.c: * Select S1AP procedure in TAU ACCEPT based on active_flag. - mme-s11-handler.c: * After Delete Session Response (OGS_GTP_DELETE_SEND_TAU_ACCEPT), send TAU ACCEPT using proper S1AP procedure by active_flag. This aligns MME TAU behavior with 3GPP TS 24.301 section 5.3.3.0a, ensuring consistent BCS synchronization regardless of UE activity.