diff --git a/srsepc/hdr/mme/s1ap_common.h b/srsepc/hdr/mme/s1ap_common.h index 9a7d72ce5..65c16f8c9 100644 --- a/srsepc/hdr/mme/s1ap_common.h +++ b/srsepc/hdr/mme/s1ap_common.h @@ -97,6 +97,7 @@ typedef struct{ LIBLTE_MME_MS_NETWORK_CAPABILITY_STRUCT ms_network_cap; bool eit; uint8_t procedure_transaction_id; + uint8_t attach_type; } ue_ctx_t; }//namespace #endif diff --git a/srsepc/src/mme/s1ap_nas_transport.cc b/srsepc/src/mme/s1ap_nas_transport.cc index 1c78ed58b..f8ef987d8 100644 --- a/srsepc/src/mme/s1ap_nas_transport.cc +++ b/srsepc/src/mme/s1ap_nas_transport.cc @@ -311,7 +311,10 @@ s1ap_nas_transport::handle_nas_imsi_attach_request(uint32_t enb_ue_s1ap_id, m_s1ap_log->console("PDN Connectivity Request -- EPS Bearer Identity requested: %d\n", pdn_con_req.eps_bearer_id); m_s1ap_log->console("PDN Connectivity Request -- Procedure Transaction Id: %d\n", pdn_con_req.proc_transaction_id); m_s1ap_log->console("PDN Connectivity Request -- ESM Information Transfer requested: %s\n", pdn_con_req.esm_info_transfer_flag_present ? "true" : "false"); - + + //Save attach request type + ue_ctx.attach_type = attach_req.eps_attach_type; + //Get Authentication Vectors from HSS if(!m_hss->gen_auth_info_answer(ue_ctx.imsi, ue_ctx.security_ctxt.k_asme, autn, rand, ue_ctx.security_ctxt.xres)) { @@ -360,6 +363,9 @@ s1ap_nas_transport::handle_nas_guti_attach_request(uint32_t enb_ue_s1ap_id, uint8_t eps_bearer_id = pdn_con_req.eps_bearer_id; //TODO: Unused ue_ctx.procedure_transaction_id = pdn_con_req.proc_transaction_id; + //Save attach request type + ue_ctx.attach_type = attach_req.eps_attach_type; + //Save whether ESM information transfer is necessary ue_ctx.eit = pdn_con_req.esm_info_transfer_flag_present; //m_s1ap_log->console("EPS Bearer id: %d\n", eps_bearer_id); @@ -412,6 +418,8 @@ s1ap_nas_transport::handle_nas_guti_attach_request(uint32_t enb_ue_s1ap_id, ue_ctx_t *ue_ctx_ptr = m_s1ap->find_ue_ctx(it->second); if(ue_ctx_ptr!=NULL) { + //Save attach request type + ue_ctx_ptr->attach_type = attach_req.eps_attach_type; m_s1ap_log->console("Found UE context. IMSI: %015lu\n",ue_ctx_ptr->imsi); m_mme_gtpc->send_create_session_request(ue_ctx_ptr->imsi, ue_ctx_ptr->mme_ue_s1ap_id); *reply_flag = false; //No reply needed