From 6513520211dd4277ad76263c4c3978b42d1ef1c7 Mon Sep 17 00:00:00 2001 From: Francisco Date: Fri, 26 Nov 2021 17:54:16 +0000 Subject: [PATCH] nr,gnb,rrc: ensure drb config is added in RRC reconf. Do not allow LCIDs<4 for DRBs --- srsgnb/src/stack/rrc/cell_asn1_config.cc | 2 +- srsgnb/src/stack/rrc/rrc_nr_ue.cc | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/srsgnb/src/stack/rrc/cell_asn1_config.cc b/srsgnb/src/stack/rrc/cell_asn1_config.cc index a21a5d431..12aeb1bee 100644 --- a/srsgnb/src/stack/rrc/cell_asn1_config.cc +++ b/srsgnb/src/stack/rrc/cell_asn1_config.cc @@ -1155,7 +1155,7 @@ void fill_cellgroup_with_radio_bearer_cfg(const rrc_nr_cfg_t& // Add DRBs for (const drb_to_add_mod_s& drb : bearers.drb_to_add_mod_list) { out.rlc_bearer_to_add_mod_list.push_back({}); - uint32_t lcid = drb_to_lcid(static_cast(drb.drb_id)); + uint32_t lcid = drb.drb_id + (int)srsran::nr_srb::count - 1; fill_drb(cfg, lcid, (srsran::nr_drb)drb.drb_id, out.rlc_bearer_to_add_mod_list.back()); } out.rlc_bearer_to_add_mod_list_present = out.rlc_bearer_to_add_mod_list.size() > 0; diff --git a/srsgnb/src/stack/rrc/rrc_nr_ue.cc b/srsgnb/src/stack/rrc/rrc_nr_ue.cc index a4c15a4a2..33dc64ac2 100644 --- a/srsgnb/src/stack/rrc/rrc_nr_ue.cc +++ b/srsgnb/src/stack/rrc/rrc_nr_ue.cc @@ -1166,6 +1166,7 @@ void rrc_nr::ue::establish_eps_bearer(uint32_t pdu_session_id, srsran::const_byt drb.drb_id = 1; drb.pdcp_cfg_present = true; + drb.pdcp_cfg.drb_present = true; drb.pdcp_cfg.drb.discard_timer_present = true; drb.pdcp_cfg.drb.discard_timer.value = pdcp_cfg_s::drb_s_::discard_timer_opts::ms100; drb.pdcp_cfg.drb.pdcp_sn_size_ul_present = true;