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:
Cedric Roux
2023-01-09 15:19:07 +01:00
parent 1a0c0cd1c9
commit 551aee172a
4 changed files with 24 additions and 28 deletions
+3 -2
View File
@@ -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;
}