mirror of
https://github.com/open5gs/open5gs.git
synced 2025-10-22 23:31:57 +00:00
When the UE sends a Tracking Area Update (TAU) Request with active_flag=0, the MME previously sent TAU Accept without verifying the EPS Bearer Context Status (EBCS). This caused stale bearer sessions to remain in the MME even if the UE had already released them. According to 3GPP TS 24.301 §5.5.3.2, the MME should release any bearer not reported in the UE’s EBCS when active_flag=0. This patch introduces mme_send_delete_session_or_tau_accept(), which compares the UE’s EBCS bitmask with the MME session list and deletes any missing default bearer session before sending TAU Accept. If no mismatch is found, TAU Accept is sent immediately. The Delete Session response triggers TAU Accept when deletions are required. This ensures that the TAU Accept message reflects the UE’s current bearer context accurately. Also includes: - Added OGS_GTP_DELETE_SEND_TAU_ACCEPT handling in mme-s11-handler.c - Simplified EBCS structure (uint16_t value) for bitmask comparison - Updated TAU-related tests with realistic EBI bitmasks (0x20, 0x60) This change aligns TAU handling with 3GPP 24.301 and prevents bearer mismatch issues between UE and EPC during TAU.