Projects
osmocom:master
open5gs
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 666
View file
commit_60a9707b8ec884da056520cc5bffcae9aba784ec.txt
Added
View file
commit_e3c3a911fab7b33027804ba0e4c2c3f731d43b31.txt
Deleted
View file
open5gs_2.7.6.4731.e3c3.dsc
Deleted
@@ -1,39 +0,0 @@ -Format: 3.0 (native) -Source: open5gs -Binary: open5gs-common, open5gs-mme, open5gs-sgwc, open5gs-smf, open5gs-amf, open5gs-sgwu, open5gs-upf, open5gs-hss, open5gs-pcrf, open5gs-nrf, open5gs-scp, open5gs-sepp, open5gs-ausf, open5gs-udm, open5gs-pcf, open5gs-nssf, open5gs-bsf, open5gs-udr, open5gs, open5gs-dbg -Architecture: any -Version: 2.7.6.4731.e3c3 -Maintainer: Harald Welte <laforge@gnumonks.org> -Uploaders: Sukchan Lee <acetcom@gmail.com> -Homepage: https://open5gs.org -Standards-Version: 4.3.0 -Vcs-Browser: https://github.com/open5gs/open5gs -Vcs-Git: git://github.com/open5gs/open5gs -Build-Depends: debhelper (>= 11), git, pkg-config, meson (>= 0.43.0), cmake, flex, bison, libgnutls28-dev, libgcrypt-dev, libssl-dev, libidn-dev | libidn11-dev, libmongoc-dev, libbson-dev, libsctp-dev, libyaml-dev, libmicrohttpd-dev, libcurl4-gnutls-dev, libnghttp2-dev, libtins-dev, libtalloc-dev -Package-List: - open5gs deb net optional arch=any - open5gs-amf deb net optional arch=any - open5gs-ausf deb net optional arch=any - open5gs-bsf deb net optional arch=any - open5gs-common deb net optional arch=any - open5gs-dbg deb net optional arch=any - open5gs-hss deb net optional arch=any - open5gs-mme deb net optional arch=any - open5gs-nrf deb net optional arch=any - open5gs-nssf deb net optional arch=any - open5gs-pcf deb net optional arch=any - open5gs-pcrf deb net optional arch=any - open5gs-scp deb net optional arch=any - open5gs-sepp deb net optional arch=any - open5gs-sgwc deb net optional arch=any - open5gs-sgwu deb net optional arch=any - open5gs-smf deb net optional arch=any - open5gs-udm deb net optional arch=any - open5gs-udr deb net optional arch=any - open5gs-upf deb net optional arch=any -Checksums-Sha1: - 0f2b9cb51815f3bcc20cabf09a0b3c1fb23ef7ca 15023920 open5gs_2.7.6.4731.e3c3.tar.xz -Checksums-Sha256: - f3f27d2fd2ba23ad56df9cd4426092fb3f0b00401051bdd73abbc6bb8cad58f5 15023920 open5gs_2.7.6.4731.e3c3.tar.xz -Files: - 2354c9a2bc8562d532cd657a1335c0cf 15023920 open5gs_2.7.6.4731.e3c3.tar.xz
View file
open5gs_2.7.6.4735.60a9.dsc
Added
@@ -0,0 +1,39 @@ +Format: 3.0 (native) +Source: open5gs +Binary: open5gs-common, open5gs-mme, open5gs-sgwc, open5gs-smf, open5gs-amf, open5gs-sgwu, open5gs-upf, open5gs-hss, open5gs-pcrf, open5gs-nrf, open5gs-scp, open5gs-sepp, open5gs-ausf, open5gs-udm, open5gs-pcf, open5gs-nssf, open5gs-bsf, open5gs-udr, open5gs, open5gs-dbg +Architecture: any +Version: 2.7.6.4735.60a9 +Maintainer: Harald Welte <laforge@gnumonks.org> +Uploaders: Sukchan Lee <acetcom@gmail.com> +Homepage: https://open5gs.org +Standards-Version: 4.3.0 +Vcs-Browser: https://github.com/open5gs/open5gs +Vcs-Git: git://github.com/open5gs/open5gs +Build-Depends: debhelper (>= 11), git, pkg-config, meson (>= 0.43.0), cmake, flex, bison, libgnutls28-dev, libgcrypt-dev, libssl-dev, libidn-dev | libidn11-dev, libmongoc-dev, libbson-dev, libsctp-dev, libyaml-dev, libmicrohttpd-dev, libcurl4-gnutls-dev, libnghttp2-dev, libtins-dev, libtalloc-dev +Package-List: + open5gs deb net optional arch=any + open5gs-amf deb net optional arch=any + open5gs-ausf deb net optional arch=any + open5gs-bsf deb net optional arch=any + open5gs-common deb net optional arch=any + open5gs-dbg deb net optional arch=any + open5gs-hss deb net optional arch=any + open5gs-mme deb net optional arch=any + open5gs-nrf deb net optional arch=any + open5gs-nssf deb net optional arch=any + open5gs-pcf deb net optional arch=any + open5gs-pcrf deb net optional arch=any + open5gs-scp deb net optional arch=any + open5gs-sepp deb net optional arch=any + open5gs-sgwc deb net optional arch=any + open5gs-sgwu deb net optional arch=any + open5gs-smf deb net optional arch=any + open5gs-udm deb net optional arch=any + open5gs-udr deb net optional arch=any + open5gs-upf deb net optional arch=any +Checksums-Sha1: + 339f1a0248bacb28a79aac7e5592443776ab41d3 15026808 open5gs_2.7.6.4735.60a9.tar.xz +Checksums-Sha256: + 362c8a8fb35e6aea6bf71f838771f66c08d79c86f1a1ccd88c5c592c2240fa7c 15026808 open5gs_2.7.6.4735.60a9.tar.xz +Files: + fb6a8a17381b2a91abb2f6941e0709b4 15026808 open5gs_2.7.6.4735.60a9.tar.xz
View file
open5gs_2.7.6.4731.e3c3.tar.xz/.tarball-version -> open5gs_2.7.6.4735.60a9.tar.xz/.tarball-version
Changed
@@ -1 +1 @@ -2.7.6.4731-e3c3 +2.7.6.4735-60a9
View file
open5gs_2.7.6.4731.e3c3.tar.xz/debian/changelog -> open5gs_2.7.6.4735.60a9.tar.xz/debian/changelog
Changed
@@ -1,8 +1,8 @@ -open5gs (2.7.6.4731.e3c3) unstable; urgency=medium +open5gs (2.7.6.4735.60a9) unstable; urgency=medium * Automatically generated changelog entry for building the Osmocom master feed - -- Osmocom OBS scripts <info@osmocom.org> Sun, 20 Jul 2025 00:34:58 +0000 + -- Osmocom OBS scripts <info@osmocom.org> Mon, 21 Jul 2025 08:13:38 +0000 open5gs (2.7.6) unstable; urgency=medium
View file
open5gs_2.7.6.4731.e3c3.tar.xz/lib/core/ogs-sockaddr.c -> open5gs_2.7.6.4735.60a9.tar.xz/lib/core/ogs-sockaddr.c
Changed
@@ -103,11 +103,18 @@ int rc; char serviceNI_MAXSERV; struct addrinfo hints, *ai, *ai_list; - ogs_sockaddr_t *prev; + ogs_sockaddr_t *prev = NULL; + + /* Last node of original list (for appending) */ + ogs_sockaddr_t *tail = NULL; + /* First newly added node (for cleanup on error) */ + ogs_sockaddr_t *first_new = NULL; + char bufOGS_ADDRSTRLEN; ogs_assert(sa_list); + /* Prepare hints for getaddrinfo() */ memset(&hints, 0, sizeof(hints)); hints.ai_family = family; hints.ai_socktype = SOCK_STREAM; @@ -118,24 +125,41 @@ rc = getaddrinfo(hostname, service, &hints, &ai_list); if (rc != 0) { ogs_log_message(OGS_LOG_ERROR, ogs_socket_errno, - "getaddrinfo(%d:%s:%d:0x%x) failed", - family, hostname, port, flags); + "getaddrinfo(%d:%s:%d:0x%x) failed: %s", + family, hostname ? hostname : "(null)", + port, flags, gai_strerror(rc)); + /* Non-fatal: log the error and return */ return OGS_ERROR; } - prev = NULL; + /* Find the end of the existing list, so new entries can be appended */ if (*sa_list) { - prev = *sa_list; - while(prev->next) prev = prev->next; + tail = *sa_list; + while (tail->next) + tail = tail->next; + prev = tail; } + + /* Iterate over each result from getaddrinfo and add to the linked list */ for (ai = ai_list; ai; ai = ai->ai_next) { ogs_sockaddr_t *new, tmp; if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6) - continue; + continue; /* Skip unsupported address families */ new = ogs_calloc(1, sizeof(ogs_sockaddr_t)); if (!new) { ogs_error("ogs_calloc() failed"); + /* Clean up any partially added entries on memory failure */ + if (first_new) { + if (tail) { + /* detach new sub-list from original list */ + tail->next = NULL; + } else { + *sa_list = NULL; /* no original list, reset head */ + } + ogs_freeaddrinfo(first_new); + } + freeaddrinfo(ai_list); return OGS_ERROR; } memcpy(&new->sa, ai->ai_addr, ai->ai_addrlen); @@ -143,30 +167,49 @@ if (hostname) { if (ogs_inet_pton(ai->ai_family, hostname, &tmp) == OGS_OK) { - /* It's a valid IP address */ + /* Input string is a valid numeric IP address */ ogs_debug("addr:%s, port:%d", OGS_ADDR(new, buf), port); } else { - /* INVALID IP address! We assume it is a hostname */ + /* Input string is not a numeric IP; treat it as a hostname */ new->hostname = ogs_strdup(hostname); - ogs_assert(new->hostname); + if (!new->hostname) { + ogs_error("ogs_strdup() failed"); + /* Free the new node and any previously added nodes */ + ogs_free(new); + if (first_new) { + if (tail) { + tail->next = NULL; + } else { + *sa_list = NULL; + } + ogs_freeaddrinfo(first_new); + } + freeaddrinfo(ai_list); + return OGS_ERROR; + } ogs_debug("name:%s, port:%d", new->hostname, port); } } - if (!prev) + /* Link the new node into the list */ + if (!prev) { *sa_list = new; - else + } else { prev->next = new; - + } prev = new; + if (!first_new) { + first_new = new; /* mark the first new node added */ + } } freeaddrinfo(ai_list); - if (prev == NULL) { + if (first_new == NULL) { + /* No addresses were added (e.g., no AF_INET/AF_INET6 results) */ ogs_log_message(OGS_LOG_ERROR, ogs_socket_errno, - "ogs_getaddrinfo(%d:%s:%d:%d) failed", - family, hostname, port, flags); + "ogs_addaddrinfo(%d:%s:%d:0x%x) returned no addresses", + family, hostname ? hostname : "(null)", port, flags); return OGS_ERROR; } @@ -800,3 +843,37 @@ /* No address */ return NULL; } + +int ogs_sockaddr_from_ip_or_fqdn(ogs_sockaddr_t **sa_list, + int family, const char *ip_or_fqdn, uint16_t port) +{ + int rc; + int flags = 0; + ogs_sockaddr_t tmp; + + ogs_assert(sa_list); + ogs_assert(ip_or_fqdn); + + /* Determine if the input is an IP literal (numeric address). + * If so, use AI_NUMERICHOST to avoid DNS lookup. */ + if (ogs_inet_pton(AF_INET, ip_or_fqdn, &tmp) == OGS_OK || + ogs_inet_pton(AF_INET6, ip_or_fqdn, &tmp) == OGS_OK) { + flags |= AI_NUMERICHOST; + } + + /* Use ogs_addaddrinfo + * to perform resolution and construct the sockaddr list */ + *sa_list = NULL; + rc = ogs_addaddrinfo(sa_list, family, ip_or_fqdn, port, flags); + if (rc != OGS_OK) { + ogs_error("Failed to resolve address: %s", ip_or_fqdn); + /* Cleanup: free any nodes that might have been added before failure */ + if (*sa_list) { + ogs_freeaddrinfo(*sa_list); + *sa_list = NULL; + } + return OGS_ERROR; + } + + return OGS_OK; +}
View file
open5gs_2.7.6.4731.e3c3.tar.xz/lib/core/ogs-sockaddr.h -> open5gs_2.7.6.4735.60a9.tar.xz/lib/core/ogs-sockaddr.h
Changed
@@ -123,6 +123,8 @@ char *ogs_gethostname(ogs_sockaddr_t *addr); char *ogs_ipstrdup(ogs_sockaddr_t *addr); char *ogs_sockaddr_to_string_static(ogs_sockaddr_t *sa_list); +int ogs_sockaddr_from_ip_or_fqdn(ogs_sockaddr_t **sa_list, + int family, const char *ip_or_fqdn, uint16_t port); #ifdef __cplusplus }
View file
open5gs_2.7.6.4731.e3c3.tar.xz/src/smf/context.c -> open5gs_2.7.6.4735.60a9.tar.xz/src/smf/context.c
Changed
@@ -111,6 +111,8 @@ void smf_context_final(void) { + int i; + ogs_gtp_node_t *gnode = NULL, *next_gnode = NULL; ogs_assert(context_initialized == 1); @@ -143,6 +145,11 @@ ogs_gtp_node_remove(&self.sgw_s5c_list, gnode); } + for (i = 0; i < self.num_of_p_cscf; i++) + ogs_free(self.p_cscfi); + for (i = 0; i < self.num_of_p_cscf6; i++) + ogs_free(self.p_cscf6i); + ogs_pool_final(&smf_gtp_node_pool); context_initialized = 0; @@ -547,40 +554,69 @@ ogs_yaml_iter_t p_cscf_iter; ogs_yaml_iter_recurse(&smf_iter, &p_cscf_iter); ogs_assert(ogs_yaml_iter_type(&p_cscf_iter) != - YAML_MAPPING_NODE); + YAML_MAPPING_NODE); self.num_of_p_cscf = 0; self.num_of_p_cscf6 = 0; do { const char *v = NULL; + ogs_sockaddr_t *resolved_list = NULL; + ogs_sockaddr_t *cur = NULL; + char bufOGS_ADDRSTRLEN; + int res; if (ogs_yaml_iter_type(&p_cscf_iter) == YAML_SEQUENCE_NODE) { if (!ogs_yaml_iter_next(&p_cscf_iter)) break; } - v = ogs_yaml_iter_value(&p_cscf_iter); - if (v) { - ogs_ipsubnet_t ipsub; - rv = ogs_ipsubnet(&ipsub, v, NULL); - ogs_assert(rv == OGS_OK); + if (!v) { + ogs_error("No value for P-CSCF in configuration"); + continue; + } - if (ipsub.family == AF_INET) { - if (self.num_of_p_cscf >= MAX_NUM_OF_P_CSCF) - ogs_warn("Ignore P-CSCF : %s", v); - else self.p_cscfself.num_of_p_cscf++ = v; + /* Use the new API to resolve IP or FQDN + * into one or more addresses */ + res = ogs_sockaddr_from_ip_or_fqdn( + &resolved_list, AF_UNSPEC, v, 0); + if (res != OGS_OK || !resolved_list) { + ogs_error("Failed to resolve P-CSCF address: %s", + v); + continue; /* Skip this entry and move to the next */ + } + + /* Iterate through all resolved addresses + * and store them */ + for (cur = resolved_list; cur; cur = cur->next) { + if (cur->ogs_sa_family == AF_INET) { + if (self.num_of_p_cscf < MAX_NUM_OF_P_CSCF) { + self.p_cscfself.num_of_p_cscf++ = + ogs_ipstrdup(cur); + } else { + ogs_warn("Ignore P-CSCF IPv4 " + "(max %d reached): %s", + MAX_NUM_OF_P_CSCF, + OGS_ADDR(cur, buf)); + } + } else if (cur->ogs_sa_family == AF_INET6) { + if (self.num_of_p_cscf6 < MAX_NUM_OF_P_CSCF) { + self.p_cscf6self.num_of_p_cscf6++ = + ogs_ipstrdup(cur); + } else { + ogs_warn("Ignore P-CSCF IPv6 " + "(max %d reached): %s", + MAX_NUM_OF_P_CSCF, + OGS_ADDR(cur, buf)); + } } - else if (ipsub.family == AF_INET6) { - if (self.num_of_p_cscf6 >= MAX_NUM_OF_P_CSCF) - ogs_warn("Ignore P-CSCF : %s", v); - else self.p_cscf6self.num_of_p_cscf6++ = v; - } else - ogs_warn("Ignore P-CSCF : %s", v); } + /* free the linked list */ + ogs_freeaddrinfo(resolved_list); } while (ogs_yaml_iter_type(&p_cscf_iter) == - YAML_SEQUENCE_NODE); + YAML_SEQUENCE_NODE); + } else if (!strcmp(smf_key, "info")) { ogs_sbi_nf_instance_t *nf_instance = NULL;
View file
open5gs_2.7.6.4731.e3c3.tar.xz/src/smf/context.h -> open5gs_2.7.6.4735.60a9.tar.xz/src/smf/context.h
Changed
@@ -129,10 +129,10 @@ const char *dns6MAX_NUM_OF_DNS; #define MAX_NUM_OF_P_CSCF 16 - const char *p_cscfMAX_NUM_OF_P_CSCF; + char *p_cscfMAX_NUM_OF_P_CSCF; int num_of_p_cscf; int p_cscf_index; - const char *p_cscf6MAX_NUM_OF_P_CSCF; + char *p_cscf6MAX_NUM_OF_P_CSCF; int num_of_p_cscf6; int p_cscf6_index;
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.