bugfix CU/DU: use correct IP address for GTP-U
Not only the teid is received from the DU but also the IP address. We have to use it too. Also, don't connect the UDP socket. The parameter remote_s_address in the configuration file must not be used, at least not for gtp-u because the IP address is received from the DU (plus for later, for multiple DUs, it won't work at all).
This commit is contained in:
@@ -552,7 +552,7 @@ instance_t gtpv1Init(openAddr_t context) {
|
||||
return id;
|
||||
}
|
||||
|
||||
void GtpuUpdateTunnelOutgoingTeid(instance_t instance, ue_id_t ue_id, ebi_t bearer_id, teid_t newOutgoingTeid) {
|
||||
void GtpuUpdateTunnelOutgoingAddressAndTeid(instance_t instance, ue_id_t ue_id, ebi_t bearer_id, in_addr_t newOutgoingAddr, teid_t newOutgoingTeid) {
|
||||
pthread_mutex_lock(&globGtp.gtp_lock);
|
||||
getInstRetVoid(compatInst(instance));
|
||||
getUeRetVoid(inst, ue_id);
|
||||
@@ -565,8 +565,9 @@ void GtpuUpdateTunnelOutgoingTeid(instance_t instance, ue_id_t ue_id, ebi_t bear
|
||||
return;
|
||||
}
|
||||
|
||||
ptr2->second.outgoing_ip_addr = newOutgoingAddr;
|
||||
ptr2->second.teid_outgoing = newOutgoingTeid;
|
||||
LOG_I(GTPU, "[%ld] Tunnel Outgoing TEID updated to %x \n", instance, ptr2->second.teid_outgoing);
|
||||
LOG_I(GTPU, "[%ld] Tunnel Outgoing TEID updated to %x and address to %x\n", instance, ptr2->second.teid_outgoing, ptr2->second.outgoing_ip_addr);
|
||||
pthread_mutex_unlock(&globGtp.gtp_lock);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -92,10 +92,11 @@ extern "C" {
|
||||
gtpCallback callBack,
|
||||
gtpCallbackSDAP callBackSDAP);
|
||||
|
||||
void GtpuUpdateTunnelOutgoingTeid(instance_t instance,
|
||||
ue_id_t ue_id,
|
||||
ebi_t bearer_id,
|
||||
teid_t newOutgoingTeid);
|
||||
void GtpuUpdateTunnelOutgoingAddressAndTeid(instance_t instance,
|
||||
ue_id_t ue_id,
|
||||
ebi_t bearer_id,
|
||||
in_addr_t newOutgoingAddr,
|
||||
teid_t newOutgoingTeid);
|
||||
|
||||
int newGtpuDeleteAllTunnels(instance_t instance, ue_id_t ue_id);
|
||||
int newGtpuDeleteTunnels(instance_t instance, ue_id_t ue_id, int nbTunnels, pdusessionid_t *pdusession_id);
|
||||
|
||||
Reference in New Issue
Block a user