Compare commits

...

3 Commits

Author SHA1 Message Date
Xin Zhe Khooi
28b6306c26 f1ap: use correct dl tnl port on initialcontextsetupreq 2024-02-21 09:22:39 +00:00
Xin Zhe Khooi
a1a052ce8b f1ap: use correct ue id at cu on initialcontextsetupresponse 2024-02-21 09:22:28 +00:00
Xin Zhe Khooi
08b46a4209 f1ap: allocate gtp tunnel on initial ue setup request (DU) 2024-02-21 09:22:21 +00:00
2 changed files with 18 additions and 2 deletions

View File

@@ -513,7 +513,8 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(sctp_assoc_t assoc_id, f1ap_ue_context_setu
0xFFFF, // We will set the right value from DU answer
-1, // no qfi
addr, // We will set the right value from DU answer
f1ap_ue_context_setup_req->drbs_to_be_setup[i].up_dl_tnl[0].port,
RC.nrrrc[0]->eth_params_s.my_portd,
// f1ap_ue_context_setup_req->drbs_to_be_setup[i].up_dl_tnl[0].port,
cu_f1u_data_req,
NULL);
/* 12.3.1 ULTunnels_ToBeSetup_Item */
@@ -689,7 +690,7 @@ int CU_handle_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, sctp_assoc_t assoc_
BIT_STRING_TO_TRANSPORT_LAYER_ADDRESS_IPv4(&dl_up_tnl0->transportLayerAddress, drb_p->up_dl_tnl[0].tl_address);
OCTET_STRING_TO_UINT32(&dl_up_tnl0->gTP_TEID, drb_p->up_dl_tnl[0].teid);
GtpuUpdateTunnelOutgoingAddressAndTeid(getCxt(instance)->gtpInst,
f1ap_ue_context_setup_resp->gNB_DU_ue_id,
f1ap_ue_context_setup_resp->gNB_CU_ue_id,
(ebi_t)drbs_setup_item_p->dRBID,
drb_p->up_dl_tnl[0].tl_address,
drb_p->up_dl_tnl[0].teid);

View File

@@ -323,6 +323,21 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(sctp_assoc_t assoc_id, f1ap_ue_context_set
//drbs_setup_item.lCID = 1L;
for (int j=0; j<resp->drbs_to_be_setup[i].up_dl_tnl_length; j++) {
f1ap_drb_to_be_setup_t *drb = &resp->drbs_to_be_setup[i];
transport_layer_addr_t tl_addr = {0};
memcpy(tl_addr.buffer, &drb->up_ul_tnl[0].tl_address, sizeof(drb->up_ul_tnl[0].tl_address));
tl_addr.length = sizeof(drb->up_ul_tnl[0].tl_address) * 8;
drb->up_dl_tnl[j].teid = newGtpuCreateTunnel(getCxt(0)->gtpInst,
resp->gNB_DU_ue_id,
drb->drb_id,
drb->drb_id,
drb->up_ul_tnl[j].teid,
-1, // no qfi
tl_addr,
drb->up_ul_tnl[0].port,
DURecvCb,
NULL);
/* ADD */
asn1cSequenceAdd(drbs_setup_item->dLUPTNLInformation_ToBeSetup_List.list,
F1AP_DLUPTNLInformation_ToBeSetup_Item_t, dLUPTNLInformation_ToBeSetup_Item);