add the additional sec cap to NAS attach request

use same capabilities that are signaled for EUTRA
master
David Rupprecht 4 years ago committed by Andre Puschmann
parent 9eb0b72cb4
commit 020d0dacc8

@ -2538,6 +2538,7 @@ LIBLTE_ERROR_ENUM liblte_mme_unpack_attach_reject_msg(LIBLTE_BYTE_MSG_STRUCT*
#define LIBLTE_MME_VOICE_DOMAIN_PREF_AND_UE_USAGE_SETTING_IEI 0x5D
#define LIBLTE_MME_ATTACH_REQUEST_DEVICE_PROPERTIES_IEI 0xD
#define LIBLTE_MME_GUTI_TYPE_IEI 0xE
#define LIBLTE_MME_ADDITIONAL_SECURITY_CAP_IEI 0x6F
// Enums
// Structs
typedef struct {
@ -2574,6 +2575,7 @@ typedef struct {
bool voice_domain_pref_and_ue_usage_setting_present;
bool device_properties_present;
bool old_guti_type_present;
bool additional_security_cap_present;
} LIBLTE_MME_ATTACH_REQUEST_MSG_STRUCT;
// Functions
LIBLTE_ERROR_ENUM liblte_mme_pack_attach_request_msg(LIBLTE_MME_ATTACH_REQUEST_MSG_STRUCT* attach_req,

@ -5062,6 +5062,43 @@ LIBLTE_ERROR_ENUM liblte_mme_pack_attach_request_msg(LIBLTE_MME_ATTACH_REQUEST_M
msg_ptr++;
}
if (attach_req->additional_security_cap_present) {
*msg_ptr = LIBLTE_MME_ADDITIONAL_SECURITY_CAP_IEI;
msg_ptr++;
*msg_ptr = 0x4; // Length
msg_ptr++;
// Pack same capabilities that are used for EUTRA
*msg_ptr = attach_req->ue_network_cap.eea[0] << 7;
*msg_ptr |= attach_req->ue_network_cap.eea[1] << 6;
*msg_ptr |= attach_req->ue_network_cap.eea[2] << 5;
*msg_ptr |= attach_req->ue_network_cap.eea[3] << 4;
*msg_ptr |= attach_req->ue_network_cap.eea[4] << 3;
*msg_ptr |= attach_req->ue_network_cap.eea[5] << 2;
*msg_ptr |= attach_req->ue_network_cap.eea[6] << 1;
*msg_ptr |= attach_req->ue_network_cap.eea[7];
msg_ptr++;
// 0x00 (5G-EA8=0, 5G-EA9=0, 5G-EA10=0, 5G-EA11=0, 5G-EA12=0, 5G-EA13=0, 5G-EA14=0, 5G-EA15=0)
*msg_ptr = 0x00;
msg_ptr++;
// Pack same integrity caps
*msg_ptr = attach_req->ue_network_cap.eia[0] << 7;
*msg_ptr |= attach_req->ue_network_cap.eia[1] << 6;
*msg_ptr |= attach_req->ue_network_cap.eia[2] << 5;
*msg_ptr |= attach_req->ue_network_cap.eia[3] << 4;
*msg_ptr |= attach_req->ue_network_cap.eia[4] << 3;
*msg_ptr |= attach_req->ue_network_cap.eia[5] << 2;
*msg_ptr |= attach_req->ue_network_cap.eia[6] << 1;
*msg_ptr |= attach_req->ue_network_cap.eia[7];
msg_ptr++;
// 0x00 (5G-IA8=0, 5G-IA9=0, 5G-IA10=0, 5G-IA11=0, 5G-IA12=0, 5G-IA13=0, 5G-IA14=0, 5G-IA15=0)
*msg_ptr = 0x00;
msg_ptr++;
}
// Fill in the number of bytes used
msg->N_bytes = msg_ptr - msg->msg;

@ -1702,6 +1702,12 @@ void nas::gen_attach_request(srslte::unique_byte_buffer_t& msg)
attach_req.device_properties_present = false;
attach_req.old_guti_type_present = false;
if (rrc->has_nr_dc()) {
attach_req.ue_network_cap.dc_nr_present = true;
attach_req.ue_network_cap.dc_nr = true;
attach_req.additional_security_cap_present = true;
}
// ESM message (PDN connectivity request) for first default bearer
gen_pdn_connectivity_request(&attach_req.esm_msg);

Loading…
Cancel
Save