From 1bea5a7ebec674ccb61b6b705a53261adbb59b17 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Wed, 24 Nov 2021 14:49:56 +0000 Subject: [PATCH] gnb,rrc_nr: make sure that we only push the NAS PDU on the SMC if it exists. --- srsgnb/src/stack/rrc/rrc_nr_ue.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/srsgnb/src/stack/rrc/rrc_nr_ue.cc b/srsgnb/src/stack/rrc/rrc_nr_ue.cc index 4c6e9d3d1..969715912 100644 --- a/srsgnb/src/stack/rrc/rrc_nr_ue.cc +++ b/srsgnb/src/stack/rrc/rrc_nr_ue.cc @@ -999,7 +999,9 @@ void rrc_nr::ue::send_security_mode_command(srsran::unique_byte_buffer_t nas_pdu parent->pdcp->config_security(rnti, srb_to_lcid(srsran::nr_srb::srb1), pdcp_cnfg); parent->pdcp->enable_integrity(rnti, srb_to_lcid(srsran::nr_srb::srb1)); - nas_pdu_queue.push_back(std::move(nas_pdu)); + if (nas_pdu != nullptr) { + nas_pdu_queue.push_back(std::move(nas_pdu)); + } asn1::rrc_nr::dl_dcch_msg_s dl_dcch_msg; dl_dcch_msg.msg.set_c1().set_security_mode_cmd().rrc_transaction_id = (uint8_t)((transaction_id++) % 4);