Pass to RRC the 5G-S-TMSI extracted from NAS Registration Accept
* NAS -> RRC: RRC receives an ITTI message with NAS 5GMM indication message containing the 5G-S-TMSI derived from NAS GUTI * 5G-S-TMSI is stored in the RRC instance and to be later encoded in the RRCSetup
This commit is contained in:
@@ -404,6 +404,13 @@ typedef struct nas_detach_req_s {
|
||||
bool wait_release;
|
||||
} nas_detach_req_t;
|
||||
|
||||
/**
|
||||
* @brief 5GS mobility management information
|
||||
* @ref clause 9.11.3 of 3GPP TS 24.501
|
||||
*/
|
||||
typedef struct nas_5gmm_ind_s {
|
||||
uint64_t fiveG_STMSI;
|
||||
} nas_5gmm_ind_t;
|
||||
/*
|
||||
* --------------------------------------------------------------------------
|
||||
* NAS information transfer
|
||||
@@ -578,6 +585,7 @@ typedef struct as_message_s {
|
||||
rab_establish_cnf_t rab_establish_cnf;
|
||||
rab_release_req_t rab_release_req;
|
||||
rab_release_ind_t rab_release_ind;
|
||||
nas_5gmm_ind_t Nas5GMMInd;
|
||||
} __attribute__((__packed__)) msg;
|
||||
} as_message_t;
|
||||
|
||||
|
||||
@@ -63,6 +63,7 @@ MESSAGE_DEF(NAS_CONN_ESTABLI_REQ, MESSAGE_PRIORITY_MED, nas_establish_req_t, nas
|
||||
MESSAGE_DEF(NAS_UPLINK_DATA_REQ, MESSAGE_PRIORITY_MED, ul_info_transfer_req_t, nas_ul_data_req)
|
||||
MESSAGE_DEF(NAS_DETACH_REQ, MESSAGE_PRIORITY_MED, nas_detach_req_t, nas_detach_req)
|
||||
MESSAGE_DEF(NAS_DEREGISTRATION_REQ, MESSAGE_PRIORITY_MED, nas_deregistration_req_t, nas_deregistration_req)
|
||||
MESSAGE_DEF(NAS_5GMM_IND, MESSAGE_PRIORITY_MED, nas_5gmm_ind_t, nas_5gmm_ind)
|
||||
|
||||
MESSAGE_DEF(NAS_RAB_ESTABLI_RSP, MESSAGE_PRIORITY_MED, rab_establish_rsp_t, nas_rab_est_rsp)
|
||||
|
||||
|
||||
@@ -76,6 +76,7 @@
|
||||
#define NAS_UPLINK_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.nas_ul_data_req
|
||||
#define NAS_DETACH_REQ(mSGpTR) (mSGpTR)->ittiMsg.nas_detach_req
|
||||
#define NAS_DEREGISTRATION_REQ(mSGpTR) (mSGpTR)->ittiMsg.nas_deregistration_req
|
||||
#define NAS_5GMM_IND(mSGpTR) (mSGpTR)->ittiMsg.nas_5gmm_ind
|
||||
|
||||
#define NAS_RAB_ESTABLI_RSP(mSGpTR) (mSGpTR)->ittiMsg.nas_rab_est_rsp
|
||||
|
||||
|
||||
@@ -601,6 +601,8 @@ NR_UE_RRC_INST_t* nr_rrc_init_ue(char* uecap_file, int nb_inst, int num_ant_tx)
|
||||
rrc->as_security_activated = false;
|
||||
rrc->detach_after_release = false;
|
||||
rrc->reconfig_after_reestab = false;
|
||||
/* 5G-S-TMSI */
|
||||
rrc->fiveG_S_TMSI = UINT64_MAX;
|
||||
|
||||
FILE *f = NULL;
|
||||
if (uecap_file)
|
||||
@@ -2098,6 +2100,12 @@ void *rrc_nrue(void *notUsed)
|
||||
break;
|
||||
}
|
||||
|
||||
case NAS_5GMM_IND: {
|
||||
nas_5gmm_ind_t *req = &NAS_5GMM_IND(msg_p);
|
||||
rrc->fiveG_S_TMSI = req->fiveG_STMSI;
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
LOG_E(NR_RRC, "[UE %ld] Received unexpected message %s\n", rrc->ue_id, ITTI_MSG_NAME(msg_p));
|
||||
break;
|
||||
|
||||
@@ -239,6 +239,9 @@ typedef struct NR_UE_RRC_INST_s {
|
||||
Rrc_State_NR_t nrRrcState;
|
||||
// flag to identify 1st reconfiguration after reestablishment
|
||||
bool reconfig_after_reestab;
|
||||
// 5G-S-TMSI
|
||||
uint64_t fiveG_S_TMSI;
|
||||
|
||||
//Sidelink params
|
||||
NR_SL_PreconfigurationNR_r16_t *sl_preconfig;
|
||||
// NTN params
|
||||
|
||||
@@ -77,6 +77,8 @@ static nr_ue_nas_t nr_ue_nas[MAX_NAS_UE] = {0};
|
||||
TYPE_DEF(NAS_SECURITY_INTEGRITY_PASSED, 4) \
|
||||
TYPE_DEF(NAS_SECURITY_BAD_INPUT, 5)
|
||||
|
||||
const char *nr_release_cause_desc[] = {"RRC_CONNECTION_FAILURE", "RRC_RESUME_FAILURE", "OTHER"};
|
||||
|
||||
typedef enum { FOREACH_STATE(TO_ENUM) } security_state_t;
|
||||
|
||||
static const text_info_t security_state_info[] = {FOREACH_STATE(TO_TEXT)};
|
||||
@@ -1365,6 +1367,15 @@ static void send_nas_detach_req(nr_ue_nas_t *nas, bool wait_release)
|
||||
itti_send_msg_to_task(TASK_RRC_NRUE, nas->UE_id, msg);
|
||||
}
|
||||
|
||||
static void send_nas_5gmm_ind(instance_t instance, const Guti5GSMobileIdentity_t *guti)
|
||||
{
|
||||
MessageDef *msg = itti_alloc_new_message(TASK_NAS_NRUE, 0, NAS_5GMM_IND);
|
||||
nas_5gmm_ind_t *ind = &NAS_5GMM_IND(msg);
|
||||
LOG_I(NR_RRC, "5G-GUTI: AMF pointer %u, AMF Set ID %u, 5G-TMSI %u \n", guti->amfpointer, guti->amfsetid, guti->tmsi);
|
||||
ind->fiveG_STMSI = ((uint64_t)guti->amfsetid << 38) | ((uint64_t)guti->amfpointer << 32) | guti->tmsi;
|
||||
itti_send_msg_to_task(TASK_RRC_NRUE, instance, msg);
|
||||
}
|
||||
|
||||
static void request_default_pdusession(nr_ue_nas_t *nas)
|
||||
{
|
||||
MessageDef *message_p = itti_alloc_new_message(TASK_NAS_NRUE, nas->UE_id, NAS_PDU_SESSION_REQ);
|
||||
@@ -1439,6 +1450,9 @@ static void handle_registration_accept(nr_ue_nas_t *nas, const uint8_t *pdu_buff
|
||||
LOG_W(NAS, "no GUTI in registration accept\n");
|
||||
}
|
||||
|
||||
if(nas->guti)
|
||||
send_nas_5gmm_ind(nas->UE_id, nas->guti);
|
||||
|
||||
as_nas_info_t initialNasMsg = {0};
|
||||
generateRegistrationComplete(nas, &initialNasMsg, NULL);
|
||||
if (initialNasMsg.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user