From 4ad7e9c5c0297dd2327d7280d0ac9f5b1fbc2842 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 6 Nov 2023 07:38:59 +0100 Subject: [PATCH] Remove dead code in GTP Remove dead code, result of 2136ceec0d3ea5b605df42059bc9602c94018297: we cannot connect() in GTP on multiple remotes (as then only packets of one host might be received), but might need to send to multiple remote sockets. --- openair3/ocp-gtpu/gtp_itf.cpp | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/openair3/ocp-gtpu/gtp_itf.cpp b/openair3/ocp-gtpu/gtp_itf.cpp index d542dd4b30..69db8caa4a 100644 --- a/openair3/ocp-gtpu/gtp_itf.cpp +++ b/openair3/ocp-gtpu/gtp_itf.cpp @@ -510,27 +510,6 @@ static int udpServerSocket(openAddr_s addr) { freeaddrinfo(servinfo); // all done with this structure - if (false) { - struct addrinfo hints; - memset(&hints,0,sizeof(hints)); - hints.ai_family=AF_UNSPEC; - hints.ai_socktype=SOCK_DGRAM; - hints.ai_protocol=0; - hints.ai_flags=AI_PASSIVE|AI_ADDRCONFIG; - struct addrinfo *res=0; - int err=getaddrinfo(addr.destinationHost,addr.destinationService,&hints,&res); - - if (err==0) { - for(p = res; p != NULL; p = p->ai_next) { - if ((err=connect(sockfd, p->ai_addr, p->ai_addrlen))==0) - break; - } - } - - if (err) - LOG_E(GTPU,"Can't filter remote host: %s, %s\n", addr.destinationHost,addr.destinationService); - } - 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);