diff --git a/srsgnb/hdr/stack/rrc/rrc_nr_ue.h b/srsgnb/hdr/stack/rrc/rrc_nr_ue.h index 87bf9a8da..84b4566c1 100644 --- a/srsgnb/hdr/stack/rrc/rrc_nr_ue.h +++ b/srsgnb/hdr/stack/rrc/rrc_nr_ue.h @@ -187,6 +187,7 @@ private: sched_nr_interface::ue_cfg_t uecfg{}; const uint32_t drb1_lcid = 4; + uint32_t drb1_five_qi = 0; /// selected by 5GC // Security helper srsgnb::nr_security_context sec_ctx; diff --git a/srsgnb/src/stack/rrc/rrc_nr_ue.cc b/srsgnb/src/stack/rrc/rrc_nr_ue.cc index 90aca8a02..b7fb7ee6b 100644 --- a/srsgnb/src/stack/rrc/rrc_nr_ue.cc +++ b/srsgnb/src/stack/rrc/rrc_nr_ue.cc @@ -925,6 +925,7 @@ void rrc_nr::ue::handle_rrc_reestablishment_request(const asn1::rrc_nr::rrc_rees // Reestablish E-RABs of old rnti later, during ConnectionReconfiguration // bearer_list.reestablish_bearers(std::move(old_ue->bearer_list)); + drb1_five_qi = old_ue->drb1_five_qi; // remove old RNTI old_ue->deactivate_bearers(); @@ -1270,6 +1271,7 @@ void rrc_nr::ue::handle_rrc_reestablishment_complete(const asn1::rrc_nr::rrc_ree for (const auto& drb : next_radio_bearer_cfg.drb_to_add_mod_list) { uint16_t lcid = drb1_lcid; parent->bearer_mapper->add_eps_bearer(rnti, lcid - 3, srsran::srsran_rat_t::nr, lcid); + parent->bearer_mapper->set_five_qi(rnti, lcid - 3, drb1_five_qi); logger.info("Established EPS bearer for LCID %u and RNTI 0x%x", lcid, rnti); } @@ -1362,6 +1364,9 @@ void rrc_nr::ue::establish_eps_bearer(uint32_t pdu_session_id, rnti, lcid - 3, srsran::srsran_rat_t::nr, lcid); // TODO: configurable bearer id <-> lcid mapping parent->bearer_mapper->set_five_qi(rnti, lcid - 3, five_qi); + // store 5QI for possible reestablishment of DRB + drb1_five_qi = five_qi; + logger.info("Established EPS bearer for LCID %u and RNTI 0x%x", lcid, rnti); }