From f872e6ec39ef78e1620c3a6497332586ad2d37f1 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Thu, 9 Apr 2020 15:53:20 +0100 Subject: [PATCH] Marking nas_pending a vector to support multiple erab setup on sending RRC reconf. --- srsenb/hdr/stack/rrc/rrc.h | 3 ++- srsenb/src/stack/rrc/rrc.cc | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/srsenb/hdr/stack/rrc/rrc.h b/srsenb/hdr/stack/rrc/rrc.h index 0b034058b..49079d476 100644 --- a/srsenb/hdr/stack/rrc/rrc.h +++ b/srsenb/hdr/stack/rrc/rrc.h @@ -322,7 +322,8 @@ private: uint32_t sr_N_pucch = 0; uint32_t sr_I = 0; bool cqi_allocated = false; - bool nas_pending = false; + + std::array nas_pending = {}; srslte::byte_buffer_t erab_info; const static uint32_t UE_PCELL_CC_IDX = 0; diff --git a/srsenb/src/stack/rrc/rrc.cc b/srsenb/src/stack/rrc/rrc.cc index eac569bc9..8d2bef1b9 100644 --- a/srsenb/src/stack/rrc/rrc.cc +++ b/srsenb/src/stack/rrc/rrc.cc @@ -1444,12 +1444,12 @@ void rrc::ue::setup_erab(uint8_t id, parent->gtpu->add_bearer(rnti, lcid, addr_, erabs[id].teid_out, &(erabs[id].teid_in)); if (nas_pdu != nullptr) { - nas_pending = true; + nas_pending[id] = true; memcpy(erab_info.msg, nas_pdu->data(), nas_pdu->size()); erab_info.N_bytes = nas_pdu->size(); parent->rrc_log->info_hex(erab_info.msg, erab_info.N_bytes, "setup_erab nas_pdu -> erab_info rnti 0x%x", rnti); } else { - nas_pending = false; + nas_pending[id] = false; } } @@ -1886,8 +1886,8 @@ void rrc::ue::send_connection_reconf(srslte::unique_byte_buffer_t pdu) parent->pdcp->enable_encryption(rnti, 3); // DRB1 has already been configured in GTPU through bearer setup - // Add NAS Attach accept - if (nas_pending) { + // Add E-RAB info message for E-RAB 5 (DRB1) + if (nas_pending[5]) { parent->rrc_log->info_hex( erab_info.msg, erab_info.N_bytes, "connection_reconf erab_info -> nas_info rnti 0x%x\n", rnti); conn_reconf->ded_info_nas_list_present = true; @@ -2095,7 +2095,7 @@ void rrc::ue::send_connection_reconf_new_bearer(const asn1::s1ap::erab_to_be_set conn_reconf->rr_cfg_ded.drb_to_add_mod_list.push_back(drb_item); // Add NAS message - if (nas_pending) { + if (nas_pending[id]) { parent->rrc_log->info_hex( erab_info.msg, erab_info.N_bytes, "reconf_new_bearer erab_info -> nas_info rnti 0x%x\n", rnti); asn1::dyn_octstring octstr(erab_info.N_bytes);