Commit 7a2f8804 authored by matzakos's avatar matzakos

Correction to parse the IP address for F1-U tunnels creation

however the address in the NGAP message is still wrong
parent 7ca1f045
......@@ -1350,7 +1350,6 @@ rrc_gNB_process_RRCReconfigurationComplete(
if(DRB_configList!=NULL){
gtpv1u_gnb_create_tunnel_req_t create_tunnel_req;
teid_t incoming_teid;
MessageDef *message_p;
message_p = itti_alloc_new_message (TASK_RRC_GNB, 0, F1AP_UE_CONTEXT_SETUP_REQ);
F1AP_UE_CONTEXT_SETUP_REQ (message_p).drbs_to_be_setup = malloc(DRB_configList->list.count*sizeof(f1ap_drb_to_be_setup_t));
......@@ -1362,15 +1361,15 @@ rrc_gNB_process_RRCReconfigurationComplete(
//create_tunnel_req.outgoing_teid[i] = 0xFFFF;
create_tunnel_req.outgoing_teid[i] = 0xFFFF;
create_tunnel_req.rnti = ue_context_pP->ue_context.rnti;
memcpy(create_tunnel_req.dst_addr[i].buffer,rrc->eth_params_s.remote_addr,4);
LOG_I(NR_RRC,"The DU remote IP address is: %s \n", rrc->eth_params_s.remote_addr);
create_tunnel_req.dst_addr[i].buffer[0] = inet_addr(rrc->eth_params_s.remote_addr);
//create_tunnel_req.dst_addr[i].length = 32;
create_tunnel_req.dst_addr[i].length = 32;
create_tunnel_req.incoming_rb_id[i] = DRB_configList->list.array[i]->drb_Identity;
//create_tunnel_req.outgoing_rb_id[i] = DRB_configList->list.array[i]->drb_Identity;
/* Here the callback function used as input is not the right one. Need to create a new one probably for F1-U, not sure
* if the kind of input parameters to the callback function are convenient though for gtp-u over F1-U.*/
incoming_teid=newGtpuCreateTunnel(0, create_tunnel_req.rnti,
ue_context_pP->ue_context.incoming_teid[i] = newGtpuCreateTunnel(0, create_tunnel_req.rnti,
create_tunnel_req.incoming_rb_id[i],
create_tunnel_req.incoming_rb_id[i],
create_tunnel_req.outgoing_teid[i],
......@@ -1379,8 +1378,8 @@ rrc_gNB_process_RRCReconfigurationComplete(
F1AP_UE_CONTEXT_SETUP_REQ (message_p).drbs_to_be_setup[i].drb_id = DRB_configList->list.array[i]->drb_Identity;
F1AP_UE_CONTEXT_SETUP_REQ (message_p).drbs_to_be_setup[i].rlc_mode = RLC_MODE_AM;
F1AP_UE_CONTEXT_SETUP_REQ (message_p).drbs_to_be_setup[i].up_ul_tnl[0].gtp_teid = incoming_teid;
memcpy(&F1AP_UE_CONTEXT_SETUP_REQ (message_p).drbs_to_be_setup[i].up_ul_tnl[0].tl_address,rrc->eth_params_s.my_addr,4);
F1AP_UE_CONTEXT_SETUP_REQ (message_p).drbs_to_be_setup[i].up_ul_tnl[0].gtp_teid = ue_context_pP->ue_context.incoming_teid[i];
F1AP_UE_CONTEXT_SETUP_REQ (message_p).drbs_to_be_setup[i].up_ul_tnl[0].tl_address = inet_addr(rrc->eth_params_s.my_addr);
F1AP_UE_CONTEXT_SETUP_REQ (message_p).drbs_to_be_setup[i].up_ul_tnl_length = 1;
}
F1AP_UE_CONTEXT_SETUP_REQ (message_p).gNB_CU_ue_id = 0;
......
......@@ -404,7 +404,6 @@ teid_t newGtpuCreateTunnel(instance_t instance, rnti_t rnti, int incoming_bearer
LOG_W(GTPU, "generated a random Teid that exists, re-generating (%x)\n",incoming_teid);
incoming_teid=gtpv1uNewTeid();
};
LOG_I (GTPU, "Allocated incoming teid: %d \n", incoming_teid);
inst->te2ue_mapping[incoming_teid].rnti=rnti;
......@@ -443,7 +442,7 @@ teid_t newGtpuCreateTunnel(instance_t instance, rnti_t rnti, int incoming_bearer
char ip4[INET_ADDRSTRLEN];
char ip6[INET6_ADDRSTRLEN];
LOG_I(GTPU, "Created tunnel for RNTI %x, teid for DL: %d, teid for UL %d to remote IPv4: %s, IPv6 %s\n",
LOG_I(GTPU, "Created tunnel for RNTI %x, teid for DL: %u, teid for UL %u to remote IPv4: %s, IPv6 %s\n",
rnti,
tmp->teid_incoming,
tmp->teid_outgoing,
......
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