From 76b84a9b61e50a543bcbae5c7d4b13d247e766ea Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Fri, 24 May 2019 15:21:21 +0200 Subject: [PATCH] fix unpacking of deactivate eps bearer context --- lib/src/asn1/liblte_mme.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/src/asn1/liblte_mme.cc b/lib/src/asn1/liblte_mme.cc index 9d417c8d8..7fdf72b78 100644 --- a/lib/src/asn1/liblte_mme.cc +++ b/lib/src/asn1/liblte_mme.cc @@ -9967,6 +9967,15 @@ LIBLTE_ERROR_ENUM liblte_mme_unpack_deactivate_eps_bearer_context_request_msg(LI if(msg != NULL && deact_eps_bearer_context_req != NULL) { + // Security Header Type + uint8_t sec_hdr_type = (msg->msg[0] & 0xF0) >> 4; + if(LIBLTE_MME_SECURITY_HDR_TYPE_PLAIN_NAS == sec_hdr_type) + { + msg_ptr++; + }else{ + msg_ptr += 6; + } + // EPS Bearer ID deact_eps_bearer_context_req->eps_bearer_id = (*msg_ptr >> 4); msg_ptr++;