Commit 574934f8 authored by gauthier's avatar gauthier

X2HO: ITTI X2AP_HANDOVER_REQ X2AP->RRC on target eNB now contains keNB* and...

X2HO: ITTI X2AP_HANDOVER_REQ X2AP->RRC on target eNB now contains keNB* and NCC, stored in RRC UE context on target eNB
parent 978cb1d7
......@@ -116,6 +116,8 @@ typedef struct x2ap_handover_req_s {
int source_rnti; /* TODO: to be fixed/remove */
int source_x2id; /* TODO: to be fixed/remove */
PhysCellId_t target_physCellId;
uint8_t kenb[32]; // keNB or keNB*
long int next_hop_chaining_count;
/* TODO: this parameter has to be removed */
int target_mod_id;
} x2ap_handover_req_t;
......
......@@ -387,6 +387,7 @@ typedef struct eNB_RRC_UE_s {
#if defined(ENABLE_SECURITY)
/* KeNB as derived from KASME received from EPC */
uint8_t kenb[32];
int8_t kenb_ncc;
uint8_t nh[32];
int8_t nh_ncc;
#endif
......
......@@ -2600,7 +2600,12 @@ global_rnti = rnti;
/* TODO: remove this hack */
ue_context_target_p->ue_context.handover_info->modid_t = mod_id;
ue_context_target_p->ue_context.handover_info->modid_s = 1-mod_id;
ue_context_target_p->ue_context.handover_info->ueid_s= m->source_rnti;
ue_context_target_p->ue_context.handover_info->ueid_s = m->source_rnti;
memset (ue_context_target_p->ue_context.nh, 0, 32);
ue_context_target_p->ue_context.nh_ncc = -1;
memcpy (ue_context_target_p->ue_context.kenb, m->kenb, 32);
ue_context_target_p->ue_context.kenb_ncc = m->next_hop_chaining_count;
}
#if 0
......
......@@ -234,8 +234,15 @@ x2ap_eNB_handle_handover_preparation(uint32_t assoc_id,
extern int x2id_to_source_rnti[1];
X2AP_HANDOVER_REQ(m).source_x2id = x2HandoverRequest->old_eNB_UE_X2AP_ID;
X2AP_HANDOVER_REQ(m).source_rnti = x2id_to_source_rnti[x2HandoverRequest->old_eNB_UE_X2AP_ID];
itti_send_msg_to_task(TASK_RRC_ENB, x2ap_eNB_data->x2ap_eNB_instance->instance, m);
return 0;
if ((x2HandoverRequest->uE_ContextInformation.aS_SecurityInformation.key_eNodeB_star.buf) &&
(x2HandoverRequest->uE_ContextInformation.aS_SecurityInformation.key_eNodeB_star.size == 256)) {
memcpy(X2AP_HANDOVER_REQ(m).kenb, x2HandoverRequest->uE_ContextInformation.aS_SecurityInformation.key_eNodeB_star.buf, 32);
X2AP_HANDOVER_REQ(m).next_hop_chaining_count = x2HandoverRequest->uE_ContextInformation.aS_SecurityInformation.nextHopChainingCount;
itti_send_msg_to_task(TASK_RRC_ENB, x2ap_eNB_data->x2ap_eNB_instance->instance, m);
return 0;
} else {
return -1;
}
#if 0
if (x2SetupRequest->globalENB_ID.eNB_ID.present == X2ap_ENB_ID_PR_home_eNB_ID) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment