From a53b321ab8944918f26165c8feeb6f7bb7c3bf0d Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Tue, 18 May 2021 15:04:25 +0100 Subject: [PATCH] Release UE upon reception of integrity error. --- lib/src/upper/pdcp_entity_lte.cc | 3 +-- srsenb/src/stack/rrc/rrc.cc | 3 ++- srsue/src/stack/rrc/rrc.cc | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/src/upper/pdcp_entity_lte.cc b/lib/src/upper/pdcp_entity_lte.cc index 03c671622..e562dcac7 100644 --- a/lib/src/upper/pdcp_entity_lte.cc +++ b/lib/src/upper/pdcp_entity_lte.cc @@ -301,8 +301,7 @@ void pdcp_entity_lte::handle_srb_pdu(srsran::unique_byte_buffer_t pdu) // Perfrom integrity checks if (integrity_direction == DIRECTION_RX || integrity_direction == DIRECTION_TXRX) { - bool pdu_valid = integrity_verify(pdu->msg, pdu->N_bytes, count, mac); - if (not pdu_valid) { + if (not integrity_verify(pdu->msg, pdu->N_bytes, count, mac)) { logger.error(pdu->msg, pdu->N_bytes, "%s Dropping PDU", rrc->get_rb_name(lcid)); rrc->notify_pdcp_integrity_error(lcid); return; // Discard diff --git a/srsenb/src/stack/rrc/rrc.cc b/srsenb/src/stack/rrc/rrc.cc index 738e964e3..ec8b0912e 100644 --- a/srsenb/src/stack/rrc/rrc.cc +++ b/srsenb/src/stack/rrc/rrc.cc @@ -292,7 +292,8 @@ void rrc::write_pdu(uint16_t rnti, uint32_t lcid, srsran::unique_byte_buffer_t p void rrc::notify_pdcp_integrity_error(uint16_t rnti, uint32_t lcid) { - logger.warning("Received Integrity Protection failured indication, rnti=0x%u, lcid=%u", rnti, lcid); + logger.warning("Received integrity protection failure indication, rnti=0x%u, lcid=%u", rnti, lcid); + release_ue(rnti); } /******************************************************************************* diff --git a/srsue/src/stack/rrc/rrc.cc b/srsue/src/stack/rrc/rrc.cc index e919ba66f..d738ef8f1 100644 --- a/srsue/src/stack/rrc/rrc.cc +++ b/srsue/src/stack/rrc/rrc.cc @@ -1622,7 +1622,7 @@ void rrc::write_pdu(uint32_t lcid, unique_byte_buffer_t pdu) void rrc::notify_pdcp_integrity_error(uint32_t lcid) { - logger.warning("Received Integrity Protection failured indication, rnti=0x%u, lcid=%u", lcid); + logger.warning("Received integrity protection failure indication, lcid=%u", lcid); } void rrc::process_pdu(uint32_t lcid, srsran::unique_byte_buffer_t pdu)