From 277e6f2998f7e012a07b2e8ff6fcbfe17d8ffa95 Mon Sep 17 00:00:00 2001 From: Francisco Date: Fri, 15 Oct 2021 20:50:08 +0100 Subject: [PATCH] nr,gnb,rrc: Ignore measurementReports from UE while RRC Reconfiguration procedure is not yet complete. --- srsenb/src/stack/rrc/rrc_ue.cc | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/srsenb/src/stack/rrc/rrc_ue.cc b/srsenb/src/stack/rrc/rrc_ue.cc index 46741e5d2..4c7ee845a 100644 --- a/srsenb/src/stack/rrc/rrc_ue.cc +++ b/srsenb/src/stack/rrc/rrc_ue.cc @@ -397,13 +397,16 @@ void rrc::ue::parse_ul_dcch(uint32_t lcid, srsran::unique_byte_buffer_t pdu) } break; case ul_dcch_msg_type_c::c1_c_::types::meas_report: - if (mobility_handler != nullptr) { - mobility_handler->handle_ue_meas_report(ul_dcch_msg.msg.c1().meas_report(), std::move(original_pdu)); + if (state == RRC_STATE_REGISTERED) { + if (mobility_handler != nullptr) { + mobility_handler->handle_ue_meas_report(ul_dcch_msg.msg.c1().meas_report(), std::move(original_pdu)); + } + if (endc_handler != nullptr) { + endc_handler->handle_ue_meas_report(ul_dcch_msg.msg.c1().meas_report()); + } } else { - parent->logger.warning("Received MeasReport but no mobility configuration is available"); - } - if (endc_handler != nullptr) { - endc_handler->handle_ue_meas_report(ul_dcch_msg.msg.c1().meas_report()); + parent->logger.warning( + "measurementReport for rnti=0x%x ignored. Cause: RRC Reconfiguration is not yet complete", rnti); } break; case ul_dcch_msg_type_c::c1_c_::types::ue_info_resp_r9: