Merge remote-tracking branch 'origin/fixes-itti-gtp-config' into integration_2025_w24 (!3473)

Fix various bugs and inconsistencies in config read, SCTP, ITTI, GTP

Fix bugs across various layers, mostly layer 3, including memory leaks.
See the commits for more details.
This commit is contained in:
Robert Schmidt
2025-06-11 18:36:39 +02:00
8 changed files with 5 additions and 51 deletions
+1 -1
View File
@@ -464,7 +464,7 @@ static void sctp_handle_new_association_req(const instance_t instance,
char port[12];
snprintf(port, sizeof(port), "%d", req->port);
int status = getaddrinfo(remote, port, &hints, &serv);
AssertFatal(status == 0, "getaddrinfo() failed: %s\n", gai_strerror(status));
AssertFatal(status == 0, "getaddrinfo(node %s service %s) failed: %s\n", remote, port, gai_strerror(status));
struct addrinfo *p = NULL;
for (p = serv; p != NULL; p = p->ai_next) {
+3 -2
View File
@@ -224,6 +224,7 @@ static int gtpv1uCreateAndSendMsg(int h,
uint8_t extensionHeader_length) {
LOG_D(GTPU, "Peer IP:%u peer port:%u outgoing teid:%u \n", peerIp, peerPort, teid);
DevAssert(msgLen + HDR_MAX < 65536); // maximum size of UDP packet
uint8_t buffer[msgLen+HDR_MAX];
uint8_t *curPtr=buffer;
Gtpv1uMsgHeaderT *msgHdr = (Gtpv1uMsgHeaderT *)buffer ;
@@ -525,14 +526,14 @@ static int udpServerSocket(openAddr_s addr) {
break; // if we get here, we must have connected successfully
}
freeaddrinfo(servinfo); // all done with this structure
if (p == NULL) {
// looped off the end of the list with no successful bind
LOG_E(GTPU,"failed to bind socket: %s %s \n", addr.originHost, addr.originService);
return -1;
}
freeaddrinfo(servinfo); // all done with this structure
int sendbuff = 1000*1000*10;
AssertFatal(0==setsockopt(sockfd, SOL_SOCKET, SO_SNDBUF, &sendbuff, sizeof(sendbuff)),"");
LOG_D(GTPU,"[%d] Created listener for paquets to: %s:%s, send buffer size: %d\n", sockfd, addr.originHost, addr.originService,sendbuff);