From 43a7d822fa26c1b5e903d2be07f3d109bfa63b61 Mon Sep 17 00:00:00 2001 From: Carlo Galiotto Date: Thu, 7 Oct 2021 16:32:53 +0200 Subject: [PATCH] stack,rrc: fix double removal of EPS bearer The EPS bearer was removed twice, causing an error in the logs. Fix issue #3380 Signed-off-by: Carlo Galiotto --- lib/include/srsran/common/bearer_manager.h | 4 ++-- lib/src/common/bearer_manager.cc | 4 ++-- srsenb/src/stack/rrc/rrc_endc.cc | 3 --- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/include/srsran/common/bearer_manager.h b/lib/include/srsran/common/bearer_manager.h index c2bdfc2d4..04cf72bff 100644 --- a/lib/include/srsran/common/bearer_manager.h +++ b/lib/include/srsran/common/bearer_manager.h @@ -51,7 +51,7 @@ public: radio_bearer_t get_radio_bearer(uint32_t eps_bearer_id); - radio_bearer_t get_lcid_bearer(uint32_t lcid); + radio_bearer_t get_eps_bearer_id_for_lcid(uint32_t lcid); private: using eps_rb_map_t = std::map; @@ -119,7 +119,7 @@ public: radio_bearer_t get_lcid_bearer(uint32_t lcid) { srsran::rwlock_read_guard rw_lock(rwlock); - return impl.get_lcid_bearer(lcid); + return impl.get_eps_bearer_id_for_lcid(lcid); } private: diff --git a/lib/src/common/bearer_manager.cc b/lib/src/common/bearer_manager.cc index 8510a1ebe..2c58dac58 100644 --- a/lib/src/common/bearer_manager.cc +++ b/lib/src/common/bearer_manager.cc @@ -58,7 +58,7 @@ ue_bearer_manager_impl::radio_bearer_t ue_bearer_manager_impl::get_radio_bearer( return it != bearers.end() ? it->second : invalid_rb; } -ue_bearer_manager_impl::radio_bearer_t ue_bearer_manager_impl::get_lcid_bearer(uint32_t lcid) +ue_bearer_manager_impl::radio_bearer_t ue_bearer_manager_impl::get_eps_bearer_id_for_lcid(uint32_t lcid) { auto lcid_it = lcid_to_eps_bearer_id.find(lcid); return lcid_it != lcid_to_eps_bearer_id.end() ? bearers.at(lcid_it->second) : invalid_rb; @@ -179,7 +179,7 @@ enb_bearer_manager::radio_bearer_t enb_bearer_manager::get_lcid_bearer(uint16_t if (user_it == users_map.end()) { return srsran::detail::ue_bearer_manager_impl::invalid_rb; } - return user_it->second.get_lcid_bearer(lcid); + return user_it->second.get_eps_bearer_id_for_lcid(lcid); } enb_bearer_manager::radio_bearer_t enb_bearer_manager::get_radio_bearer(uint16_t rnti, uint32_t eps_bearer_id) diff --git a/srsenb/src/stack/rrc/rrc_endc.cc b/srsenb/src/stack/rrc/rrc_endc.cc index 8a1ad789e..d99baa5e1 100644 --- a/srsenb/src/stack/rrc/rrc_endc.cc +++ b/srsenb/src/stack/rrc/rrc_endc.cc @@ -280,9 +280,6 @@ void rrc::ue::rrc_endc::handle_sgnb_add_req_ack(wait_sgnb_add_req_resp_st& s, co // TODO: path update procedure with GTPU modify bearer request (for mode 3A and 3X) - // delete EPS bearer mapping over EUTRA PDCP - rrc_enb->bearer_manager.remove_eps_bearer(rrc_ue->rnti, ev.params.eps_bearer_id); - // re-register EPS bearer over NR PDCP rrc_enb->bearer_manager.add_eps_bearer( ev.params.nr_rnti, ev.params.eps_bearer_id, srsran::srsran_rat_t::nr, lcid_drb_nr);