diff --git a/srsenb/hdr/stack/rrc/rrc_ue.h b/srsenb/hdr/stack/rrc/rrc_ue.h index 9b574cb90..feac3600a 100644 --- a/srsenb/hdr/stack/rrc/rrc_ue.h +++ b/srsenb/hdr/stack/rrc/rrc_ue.h @@ -68,7 +68,7 @@ public: enum class conn_request_result_t { success, error_mme_not_connected, error_unknown_rnti }; /// Possible causes for the RRC to transition to the idle state. - enum class rrc_idle_transition_cause { release, timeout, radio_conn_with_ue_lost }; + enum class rrc_idle_transition_cause { release, timeout, radio_conn_with_ue_lost, msg3_timeout, unspecified }; void handle_rrc_con_req(asn1::rrc::rrc_conn_request_s* msg); void handle_rrc_con_setup_complete(asn1::rrc::rrc_conn_setup_complete_s* msg, srsran::unique_byte_buffer_t pdu); diff --git a/srsenb/src/stack/rrc/rrc_ue.cc b/srsenb/src/stack/rrc/rrc_ue.cc index b6cb146e6..56b729201 100644 --- a/srsenb/src/stack/rrc/rrc_ue.cc +++ b/srsenb/src/stack/rrc/rrc_ue.cc @@ -126,12 +126,20 @@ void rrc::ue::activity_timer_expired(activity_timeout_type_t type) ue_cell_list.get_ue_cc_idx(UE_PCELL_CC_IDX)->cell_common->enb_cc_idx, static_cast(rrc_idle_transition_cause::radio_conn_with_ue_lost), rnti); + } else if (type == MSG3_RX_TIMEOUT) { + // MSG3 timeout, no need to notify S1AP, just remove UE + parent->rem_user_thread(rnti); + event_logger::get().log_rrc_disconnect(ue_cell_list.get_ue_cc_idx(UE_PCELL_CC_IDX)->cell_common->enb_cc_idx, + static_cast(rrc_idle_transition_cause::msg3_timeout), + rnti); } else { - parent->s1ap->user_release(rnti, asn1::s1ap::cause_radio_network_opts::unspecified); - event_logger::get().log_rrc_disconnect( - ue_cell_list.get_ue_cc_idx(UE_PCELL_CC_IDX)->cell_common->enb_cc_idx, - static_cast(rrc_idle_transition_cause::radio_conn_with_ue_lost), - rnti); + // Unhandled activity timeout, just remove UE and log an error + parent->rem_user_thread(rnti); + event_logger::get().log_rrc_disconnect(ue_cell_list.get_ue_cc_idx(UE_PCELL_CC_IDX)->cell_common->enb_cc_idx, + static_cast(rrc_idle_transition_cause::msg3_timeout), + rnti); + parent->logger.error( + "Unhandled reason for activity timer expiration. rnti=0x%x, cause %d", rnti, static_cast(type)); } } else { if (rnti != SRSRAN_MRNTI) {