From b59eca1b2795ab3e744382503e812ce6f609cfab Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Fri, 4 Sep 2020 12:22:43 +0100 Subject: [PATCH] Wait until reestablish complete is finished to swap rnti in s1ap and gtpu. --- srsenb/src/stack/rrc/rrc_ue.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/srsenb/src/stack/rrc/rrc_ue.cc b/srsenb/src/stack/rrc/rrc_ue.cc index ee4b0ca19..3a84a4c14 100644 --- a/srsenb/src/stack/rrc/rrc_ue.cc +++ b/srsenb/src/stack/rrc/rrc_ue.cc @@ -350,10 +350,6 @@ void rrc::ue::handle_rrc_con_reest_req(rrc_conn_reest_request_s* msg) ue_security_cfg = parent->users[old_rnti]->ue_security_cfg; ue_security_cfg.regenerate_keys_handover(pcell_cfg->cell_cfg.pci, pcell_cfg->cell_cfg.dl_earfcn); - // Modify GTP-U tunnel and S1AP context - parent->gtpu->mod_bearer_rnti(old_rnti, rnti); - parent->s1ap->user_mod(old_rnti, rnti); - // Get PDCP entity state (required when using RLC AM) for (const auto& erab_pair : parent->users[old_rnti]->bearer_list.get_erabs()) { uint16_t lcid = erab_pair.second.id - 2; @@ -430,6 +426,10 @@ void rrc::ue::handle_rrc_con_reest_complete(rrc_conn_reest_complete_s* msg, srsl // TODO: msg->selected_plmn_id - used to select PLMN from SIB1 list // TODO: if(msg->registered_mme_present) - the indicated MME should be used from a pool + // Modify GTP-U tunnel and S1AP context + parent->gtpu->mod_bearer_rnti(old_reest_rnti, rnti); + parent->s1ap->user_mod(old_reest_rnti, rnti); + // Flag completion of RadioResource Configuration bearer_list.rr_ded_cfg_complete();