Commit 5c4c336b authored by vettel's avatar vettel

Merge branch 'x2-ka-test' of https://gitlab.eurecom.fr/oai/openairinterface5g into x2-ka-test

parents 15a7b91c 55551062
......@@ -376,6 +376,7 @@ int x2ap_eNB_generate_x2_handover_request(x2ap_eNB_instance_t *instance_p,
X2ap_E_RABs_ToBeSetup_Item_t *e_RABs_ToBeSetup_Item1 = calloc(1, sizeof(X2ap_E_RABs_ToBeSetup_Item_t));
X2ap_E_RABs_ToBeSetup_ListIEs_t *e_RABs_ToBeSetup_List1 = calloc(1, sizeof(X2ap_E_RABs_ToBeSetup_ListIEs_t));
int i;
for (i=0;i<rrc_eNB_ue_context->ue_context.setup_e_rabs;i++){
......@@ -406,15 +407,17 @@ int x2ap_eNB_generate_x2_handover_request(x2ap_eNB_instance_t *instance_p,
//TRLA_TO_BIT_STRING(rrc_eNB_ue_context->ue_context.e_rab[i].param.sgw_addr.buffer,
// &e_RABs_ToBeSetup_Item1->uL_GTPtunnelEndpoint.transportLayerAddress); // IPv4
GTP_TEID_TO_OCTET_STRING (rrc_eNB_ue_context->ue_context.e_rab[i].param.gtp_teid,
&e_RABs_ToBeSetup_Item1->uL_GTPtunnelEndpoint.gTP_TEID);
INT32_TO_OCTET_STRING(rrc_eNB_ue_context->ue_context.e_rab[i].param.gtp_teid,
&e_RABs_ToBeSetup_Item1->uL_GTPtunnelEndpoint.gTP_TEID);
X2ap_E_RABs_ToBeSetup_ListIEs_t *e_RABs_ToBeSetup_List1 = calloc(1, sizeof(X2ap_E_RABs_ToBeSetup_ListIEs_t));
//GTP_TEID_TO_OCTET_STRING (rrc_eNB_ue_context->ue_context.e_rab[i].param.gtp_teid,
// &e_RABs_ToBeSetup_Item1->uL_GTPtunnelEndpoint.gTP_TEID);
ASN_SEQUENCE_ADD(e_RABs_ToBeSetup_List1, e_RABs_ToBeSetup_Item1);
x2ap_encode_x2ap_e_rabs_tobesetup_list(&message.msg.x2ap_HandoverRequest_IEs.uE_ContextInformation.e_RABs_ToBeSetup_List, e_RABs_ToBeSetup_List1);
}
x2ap_encode_x2ap_e_rabs_tobesetup_list(&message.msg.x2ap_HandoverRequest_IEs.uE_ContextInformation.e_RABs_ToBeSetup_List, e_RABs_ToBeSetup_List1);
#if 0
char RRC[81] = { 0x0a,0x10,0x00,0x00,0x03,0x41,0x60,0x08,0xcf,0x50,0x4a,0x0e,0x07,0x00,0x8c,0xf5,0x04,0xa0,0xe0,0x03,0xc0,0x51,0xc2,0x28,
0xb8,0x56,0xd1,0x80,0x4a,0x00,0x00,0x08,0x18,0x02,0x20,0x42,0x08,0x00,0x80,0x60,0x00,0x20,0x00,0x00,0x03,0x82,0xca,0x04,
......
......@@ -236,10 +236,15 @@ x2ap_eNB_handle_handover_preparation(uint32_t assoc_id,
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];
X2AP_HANDOVER_REQ(m).nb_e_rabs_tobesetup=x2HandoverRequest->uE_ContextInformation.e_RABs_ToBeSetup_List.list.count;
X2ap_E_RABs_ToBeSetup_Item_t *e_RABs_ToBeSetup_Item;
X2ap_E_RABs_ToBeSetup_ListIEs_t *e_RABs_ToBeSetup_ListIEs=calloc(1, sizeof(X2ap_E_RABs_ToBeSetup_ListIEs_t));
if (x2ap_decode_x2ap_e_rabs_tobesetup_list(e_RABs_ToBeSetup_ListIEs,
&x2HandoverRequest->uE_ContextInformation.e_RABs_ToBeSetup_List)>0) {
for (i=0; i< x2HandoverRequest->uE_ContextInformation.e_RABs_ToBeSetup_List.list.count;i++){
e_RABs_ToBeSetup_Item=(X2ap_E_RABs_ToBeSetup_Item_t *) x2HandoverRequest->uE_ContextInformation.e_RABs_ToBeSetup_List.list.array[i];
X2ap_E_RABs_ToBeSetup_Item_t *e_RABs_ToBeSetup_Item;
e_RABs_ToBeSetup_Item=(X2ap_E_RABs_ToBeSetup_Item_t *) e_RABs_ToBeSetup_ListIEs->x2ap_E_RABs_ToBeSetup_Item.array[i];
X2AP_HANDOVER_REQ(m).e_rabs_tobesetup[i].e_rab_id=e_RABs_ToBeSetup_Item->e_RAB_ID;
......@@ -254,7 +259,9 @@ x2ap_eNB_handle_handover_preparation(uint32_t assoc_id,
X2AP_HANDOVER_REQ(m).e_rabs_tobesetup[i].gtp_teid);
}
}else {
X2AP_ERROR ("Can't decode the e_RABs_ToBeSetup_List \n");
}
if ((x2HandoverRequest->uE_ContextInformation.aS_SecurityInformation.key_eNodeB_star.buf) &&
(x2HandoverRequest->uE_ContextInformation.aS_SecurityInformation.key_eNodeB_star.size == 32)) {
memcpy(X2AP_HANDOVER_REQ(m).kenb, x2HandoverRequest->uE_ContextInformation.aS_SecurityInformation.key_eNodeB_star.buf, 32);
......
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