diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index 052dd6148b..61bfa1cf8e 100644 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -1572,7 +1572,7 @@ rrc_gNB_generate_UECapabilityEnquiry( rrc_gNB_mui, size); #ifdef ITTI_SIM - MessageDef *message_p; + MessageDef *message_p; uint8_t *message_buffer; message_buffer = itti_malloc (TASK_RRC_GNB, TASK_RRC_UE_SIM, size); memcpy (message_buffer, buffer, size); diff --git a/openair2/RRC/NR_UE/rrc_UE.c b/openair2/RRC/NR_UE/rrc_UE.c index e87770dc52..176427c4ce 100755 --- a/openair2/RRC/NR_UE/rrc_UE.c +++ b/openair2/RRC/NR_UE/rrc_UE.c @@ -1632,7 +1632,7 @@ nr_rrc_ue_process_securityModeCommand( securityModeCommand->criticalExtensions.choice.securityModeCommand->securityConfigSMC.securityAlgorithmConfig.cipheringAlgorithm; NR_UE_rrc_inst->integrityProtAlgorithm = *securityModeCommand->criticalExtensions.choice.securityModeCommand->securityConfigSMC.securityAlgorithmConfig.integrityProtAlgorithm; -memset((void *)&ul_dcch_msg,0,sizeof(NR_UL_DCCH_Message_t)); + memset((void *)&ul_dcch_msg,0,sizeof(NR_UL_DCCH_Message_t)); //memset((void *)&SecurityModeCommand,0,sizeof(SecurityModeCommand_t)); ul_dcch_msg.message.present = NR_UL_DCCH_MessageType_PR_c1; ul_dcch_msg.message.choice.c1 = calloc(1, sizeof(*ul_dcch_msg.message.choice.c1)); @@ -1696,7 +1696,7 @@ memset((void *)&ul_dcch_msg,0,sizeof(NR_UL_DCCH_Message_t)); ul_dcch_msg.message.choice.c1->choice.securityModeComplete->rrc_TransactionIdentifier = securityModeCommand->rrc_TransactionIdentifier; ul_dcch_msg.message.choice.c1->choice.securityModeComplete->criticalExtensions.present = NR_SecurityModeComplete__criticalExtensions_PR_securityModeComplete; ul_dcch_msg.message.choice.c1->choice.securityModeComplete->criticalExtensions.choice.securityModeComplete = CALLOC(1, sizeof(NR_SecurityModeComplete_IEs_t)); - ul_dcch_msg.message.choice.c1->choice.securityModeComplete->criticalExtensions.choice.securityModeComplete->nonCriticalExtension =NULL; + ul_dcch_msg.message.choice.c1->choice.securityModeComplete->criticalExtensions.choice.securityModeComplete->nonCriticalExtension =NULL; LOG_I(NR_RRC,"[UE %d] SFN/SF %d/%d: Receiving from SRB1 (DL-DCCH), encoding securityModeComplete (gNB %d), rrc_TransactionIdentifier: %ld\n", ctxt_pP->module_id,ctxt_pP->frame, ctxt_pP->subframe, gNB_index, securityModeCommand->rrc_TransactionIdentifier); enc_rval = uper_encode_to_buffer(&asn_DEF_NR_UL_DCCH_Message, diff --git a/openair2/RRC/NR_UE/rrc_defs.h b/openair2/RRC/NR_UE/rrc_defs.h index 35f815ca8f..5fda05eeb1 100644 --- a/openair2/RRC/NR_UE/rrc_defs.h +++ b/openair2/RRC/NR_UE/rrc_defs.h @@ -126,6 +126,8 @@ typedef struct NR_UE_RRC_INST_s { /* KeNB as computed from parameters within USIM card */ uint8_t kgnb[32]; + NR_CipheringAlgorithm_t cipheringAlgorithm; + e_NR_IntegrityProtAlgorithm integrityProtAlgorithm; /* Used integrity/ciphering algorithms */ //RRC_LIST_TYPE(NR_SecurityAlgorithmConfig_t, NR_SecurityAlgorithmConfig) SecurityAlgorithmConfig_list; diff --git a/openair3/NGAP/ngap_gNB_nas_procedures.c b/openair3/NGAP/ngap_gNB_nas_procedures.c index 8348c06ee3..8d0c0adab5 100644 --- a/openair3/NGAP/ngap_gNB_nas_procedures.c +++ b/openair3/NGAP/ngap_gNB_nas_procedures.c @@ -221,7 +221,7 @@ int ngap_gNB_handle_nas_first_req( ie->value.choice.UserLocationInformation.present = NGAP_UserLocationInformation_PR_userLocationInformationNR; - ie->value.choice.UserLocationInformation.choice.userLocationInformationNR = + ie->value.choice.UserLocationInformation.choice.userLocationInformationNR = CALLOC(1, sizeof(*ie->value.choice.UserLocationInformation.choice.userLocationInformationNR)); userinfo_nr_p = ie->value.choice.UserLocationInformation.choice.userLocationInformationNR;