Projects
osmocom:master
open5gs
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 567
View file
commit_33960bbb66b4ea2b5d36c2302e34cf2818deedea.txt
Deleted
View file
commit_35a14b595d03824ba1372758a0e3fef8666ed381.txt
Added
View file
open5gs_2.7.2.4573.3396.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.2.4573.3396 -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, 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: - d033feb8ea18a80a364bae2ba020494f2792076a 14516436 open5gs_2.7.2.4573.3396.tar.xz -Checksums-Sha256: - 791b7d82f262b77a476769619cffecd1ffc9eb9d6ca3d48ad3b1244153c29821 14516436 open5gs_2.7.2.4573.3396.tar.xz -Files: - 2773d17ed9240fd504379c5e8c11ea33 14516436 open5gs_2.7.2.4573.3396.tar.xz
View file
open5gs_2.7.2.4578.35a1.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.2.4578.35a1 +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, 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: + 97bf58732ada2823af308cce7564940682c2af29 14515248 open5gs_2.7.2.4578.35a1.tar.xz +Checksums-Sha256: + 7df797ec5f0e095c627b7a7399df3921a71e505d14d1a36d2fa6032c4f8f4693 14515248 open5gs_2.7.2.4578.35a1.tar.xz +Files: + b217b24bae6495623c80963f5ee163c1 14515248 open5gs_2.7.2.4578.35a1.tar.xz
View file
open5gs_2.7.2.4573.3396.tar.xz/.tarball-version -> open5gs_2.7.2.4578.35a1.tar.xz/.tarball-version
Changed
@@ -1 +1 @@ -2.7.2.4573-3396 +2.7.2.4578-35a1
View file
open5gs_2.7.2.4573.3396.tar.xz/debian/changelog -> open5gs_2.7.2.4578.35a1.tar.xz/debian/changelog
Changed
@@ -1,8 +1,8 @@ -open5gs (2.7.2.4573.3396) unstable; urgency=medium +open5gs (2.7.2.4578.35a1) unstable; urgency=medium * Automatically generated changelog entry for building the Osmocom master feed - -- Osmocom OBS scripts <info@osmocom.org> Thu, 26 Dec 2024 06:13:09 +0000 + -- Osmocom OBS scripts <info@osmocom.org> Fri, 27 Dec 2024 00:35:07 +0000 open5gs (2.7.2) unstable; urgency=medium
View file
open5gs_2.7.2.4573.3396.tar.xz/lib/core/ogs-sockaddr.c -> open5gs_2.7.2.4578.35a1.tar.xz/lib/core/ogs-sockaddr.c
Changed
@@ -666,3 +666,31 @@ return ogs_strdup(buf); } + +char *ogs_sockaddr_strdup(ogs_sockaddr_t *sa_list) +{ + char dumpstrOGS_HUGE_LEN; + char *p, *last; + ogs_sockaddr_t *addr = NULL; + + last = dumpstr + OGS_HUGE_LEN; + p = dumpstr; + + addr = (ogs_sockaddr_t *)sa_list; + while (addr) { + char bufOGS_ADDRSTRLEN; + p = ogs_slprintf(p, last, "%s:%d ", + OGS_ADDR(addr, buf), OGS_PORT(addr)); + addr = addr->next; + } + + if (p > dumpstr) { + /* If there is more than one addr, remove the last character */ + *(p-1) = 0; + + return ogs_strdup(dumpstr); + } + + /* No address */ + return NULL; +}
View file
open5gs_2.7.2.4573.3396.tar.xz/lib/core/ogs-sockaddr.h -> open5gs_2.7.2.4578.35a1.tar.xz/lib/core/ogs-sockaddr.h
Changed
@@ -125,6 +125,7 @@ char *ogs_gethostname(ogs_sockaddr_t *addr); char *ogs_ipstrdup(ogs_sockaddr_t *addr); +char *ogs_sockaddr_strdup(ogs_sockaddr_t *sa_list); #ifdef __cplusplus }
View file
open5gs_2.7.2.4573.3396.tar.xz/lib/sctp/ogs-lksctp.c -> open5gs_2.7.2.4578.35a1.tar.xz/lib/sctp/ogs-lksctp.c
Changed
@@ -54,6 +54,37 @@ } /** + * Determines the appropriate SCTP socket family based on the provided + * address list. + * Returns AF_INET6 if any address in sa_list is IPv6, otherwise AF_INET. + * Returns AF_UNSPEC if sa_list is NULL or no suitable family is found. + * + * @param sa_list List of addresses to check. + * @return AF_INET6, AF_INET, or AF_UNSPEC if no suitable family is found. + */ +static int sctp_socket_family_from_addr_list(const ogs_sockaddr_t *sa_list) +{ + const ogs_sockaddr_t *addr = sa_list; + + if (!sa_list) { + ogs_error("Address list is NULL"); + return AF_UNSPEC; + } + + /* Iterate through the address list to find an IPv6 address */ + while (addr != NULL) { + if (addr->ogs_sa_family == AF_INET6) { + return AF_INET6; + } + addr = addr->next; + } + + /* Default to AF_INET if no IPv6 address is found */ + return AF_INET; +} + + +/** * @brief * 1) Count the number of addresses in sa_list and determine the total * buffer size. @@ -133,7 +164,8 @@ ogs_sockopt_t *socket_option) { int rv; - char bufOGS_ADDRSTRLEN; + char *sa_list_str = NULL; + int sa_family; ogs_sock_t *new_sock = NULL; ogs_sockopt_t option; @@ -143,6 +175,7 @@ int total_len = 0; ogs_assert(sa_list); + sa_list_str = ogs_sockaddr_strdup(sa_list); /* Initialize socket options. */ ogs_sockopt_init(&option); @@ -159,20 +192,22 @@ sa_list, &addr_count, &total_len); if (!addr_buf) { /* The helper logs errors, so just return. */ - return NULL; + ogs_error("create_continuous_address_buffer() failed"); + goto err; } - /* - * Create an SCTP socket using the family of the first address - * in sa_list. - */ - new_sock = ogs_sctp_socket(sa_list->ogs_sa_family, type); - if (!new_sock) { + /* Determine the appropriate address family from sa_list */ + sa_family = sctp_socket_family_from_addr_list(sa_list); + if (sa_family == AF_UNSPEC) { ogs_log_message(OGS_LOG_ERROR, ogs_socket_errno, - "sctp_server() Failed to create SCTP socket"); + "sctp_client() No suitable address family found " + "in sa_list"); goto err; } + /* Create the SCTP socket using the determined address family */ + new_sock = ogs_sctp_socket(sa_family, type); + /* Configure SCTP-specific options. */ rv = ogs_sctp_peer_addr_params(new_sock, &option); ogs_assert(rv == OGS_OK); @@ -214,8 +249,8 @@ /* * Log debug info: only the first address is shown here as an example. */ - ogs_debug("sctp_server() %s:%d (bound %d addresses)", - OGS_ADDR(sa_list, buf), OGS_PORT(sa_list), addr_count); + ogs_debug("sctp_server() %s (bound %d addresses)", sa_list_str, addr_count); + ogs_free(sa_list_str); /* Start listening for connections. */ rv = ogs_sock_listen(new_sock); @@ -236,8 +271,9 @@ * in sa_list (customize as needed). */ ogs_log_message(OGS_LOG_ERROR, ogs_socket_errno, - "sctp_server() %s:%d failed", - OGS_ADDR(sa_list, buf), OGS_PORT(sa_list)); + "sctp_server() %s failed", sa_list_str); + ogs_free(sa_list_str); + return NULL; } @@ -248,7 +284,8 @@ ogs_sockopt_t *socket_option) { int rv; - char bufOGS_ADDRSTRLEN; + char *sa_list_str = NULL; + int sa_family; ogs_sock_t *new_sock = NULL; ogs_sockopt_t option; @@ -263,6 +300,7 @@ int local_len = 0; ogs_assert(sa_list); + sa_list_str = ogs_sockaddr_strdup(sa_list); /* Initialize socket options and copy user-provided options if present. */ ogs_sockopt_init(&option); @@ -276,21 +314,22 @@ remote_buf = create_continuous_address_buffer( sa_list, &remote_count, &remote_len); if (!remote_buf) { - /* Logs and returns NULL on failure. */ - return NULL; + ogs_error("create_continuous_address_buffer() failed"); + goto err; } - /* - * Create the SCTP socket using the address family of the first remote - * address. - */ - new_sock = ogs_sctp_socket(sa_list->ogs_sa_family, type); - if (!new_sock) { + /* Determine the appropriate address family from sa_list */ + sa_family = sctp_socket_family_from_addr_list(sa_list); + if (sa_family == AF_UNSPEC) { ogs_log_message(OGS_LOG_ERROR, ogs_socket_errno, - "sctp_client() Failed to create SCTP socket"); + "sctp_client() No suitable address family found " + "in sa_list"); goto err; } + /* Create the SCTP socket using the determined address family */ + new_sock = ogs_sctp_socket(sa_family, type); + /* Configure SCTP-specific options. */ rv = ogs_sctp_peer_addr_params(new_sock, &option); ogs_assert(rv == OGS_OK); @@ -352,8 +391,8 @@ } /* Debug log for the first remote address. */ - ogs_debug("sctp_client() connected to %s:%d", - OGS_ADDR(sa_list, buf), OGS_PORT(sa_list)); + ogs_debug("sctp_client() connected to %s", sa_list_str); + ogs_free(sa_list_str); /* Success: free buffers and return the new socket. */ if (local_buf) @@ -375,15 +414,16 @@ * Adjust to your needs, e.g., log local too if necessary. */ ogs_log_message(OGS_LOG_ERROR, ogs_socket_errno, - "sctp_client() %s:%d failed", - OGS_ADDR(sa_list, buf), - OGS_PORT(sa_list)); + "sctp_client() %s failed", sa_list_str); + ogs_free(sa_list_str); + return NULL; } int ogs_sctp_connect(ogs_sock_t *sock, ogs_sockaddr_t *sa_list) { ogs_sockaddr_t *addr; + char *sa_list_str = NULL; char bufOGS_ADDRSTRLEN; ogs_assert(sock); @@ -404,9 +444,11 @@ } if (addr == NULL) { + sa_list_str = ogs_sockaddr_strdup(sa_list); ogs_log_message(OGS_LOG_ERROR, ogs_socket_errno, - "sctp_connect() %s:%d failed", - OGS_ADDR(sa_list, buf), OGS_PORT(sa_list)); + "sctp_connect() %s failed", sa_list_str); + ogs_free(sa_list_str); + return OGS_ERROR; }
View file
open5gs_2.7.2.4573.3396.tar.xz/lib/sctp/ogs-usrsctp.c -> open5gs_2.7.2.4578.35a1.tar.xz/lib/sctp/ogs-usrsctp.c
Changed
@@ -93,6 +93,7 @@ int type, ogs_sockaddr_t *sa_list, ogs_sockopt_t *socket_option) { int rv; + char *sa_list_str = NULL; char bufOGS_ADDRSTRLEN; ogs_sock_t *new = NULL; @@ -142,8 +143,10 @@ } if (addr == NULL) { - ogs_error("sctp_server %s:%d failed", - OGS_ADDR(sa_list, buf), OGS_PORT(sa_list)); + sa_list_str = ogs_sockaddr_strdup(sa_list); + ogs_error("sctp_server %s failed", sa_list_str); + ogs_free(sa_list_str); + return NULL; } @@ -161,6 +164,7 @@ ogs_sockopt_t *socket_option) { int rv; + char *sa_list_str = NULL; char bufOGS_ADDRSTRLEN; ogs_sock_t *new = NULL; @@ -210,8 +214,10 @@ } if (addr == NULL) { - ogs_error("sctp_client %s:%d failed", - OGS_ADDR(sa_list, buf), OGS_PORT(sa_list)); + sa_list_str = ogs_sockaddr_strdup(sa_list); + ogs_error("sctp_client %s failed", sa_list_str); + ogs_free(sa_list_str); + return NULL; } @@ -221,7 +227,7 @@ int ogs_sctp_bind(ogs_sock_t *sock, ogs_sockaddr_t *sa_list) { struct socket *socket = (struct socket *)sock; - char bufOGS_ADDRSTRLEN; + char *sa_list_str = NULL; socklen_t addrlen; ogs_assert(socket); @@ -231,13 +237,16 @@ ogs_assert(addrlen); if (usrsctp_bind(socket, &sa_list->sa, addrlen) != 0) { - ogs_error("sctp_bind() %s:%d failed", - OGS_ADDR(sa_list, buf), OGS_PORT(sa_list)); + sa_list_str = ogs_sockaddr_strdup(sa_list); + ogs_error("sctp_bind() %s failed", sa_list_str); + ogs_free(sa_list_str); + return OGS_ERROR; } - ogs_debug("sctp_bind() %s:%d", - OGS_ADDR(sa_list, buf), OGS_PORT(sa_list)); + sa_list_str = ogs_sockaddr_strdup(sa_list); + ogs_debug("sctp_bind() %s", sa_list_str); + ogs_free(sa_list_str); return OGS_OK; } @@ -245,7 +254,7 @@ int ogs_sctp_connect(ogs_sock_t *sock, ogs_sockaddr_t *sa_list) { struct socket *socket = (struct socket *)sock; - char bufOGS_ADDRSTRLEN; + char *sa_list_str = NULL; socklen_t addrlen; ogs_assert(socket); @@ -255,13 +264,16 @@ ogs_assert(addrlen); if (usrsctp_connect(socket, &sa_list->sa, addrlen) != 0) { - ogs_error("sctp_connect() %s:%d", - OGS_ADDR(sa_list, buf), OGS_PORT(sa_list)); + sa_list_str = ogs_sockaddr_strdup(sa_list); + ogs_error("sctp_connect() %s", sa_list_str); + ogs_free(sa_list_str); + return OGS_ERROR; } - ogs_debug("sctp_connect() %s:%d", - OGS_ADDR(sa_list, buf), OGS_PORT(sa_list)); + sa_list_str = ogs_sockaddr_strdup(sa_list); + ogs_debug("sctp_connect() %s", sa_list_str); + ogs_free(sa_list_str); return OGS_OK; }
View file
open5gs_2.7.2.4573.3396.tar.xz/src/mme/mme-context.c -> open5gs_2.7.2.4578.35a1.tar.xz/src/mme/mme-context.c
Changed
@@ -2840,13 +2840,13 @@ ogs_sctp_destroy(vlr->sock); } -mme_vlr_t *mme_vlr_find_by_addr(const ogs_sockaddr_t *addr) +mme_vlr_t *mme_vlr_find_by_sock(const ogs_sock_t *sock) { mme_vlr_t *vlr = NULL; - ogs_assert(addr); + ogs_assert(sock); ogs_list_for_each(&self.vlr_list, vlr) { - if (ogs_sockaddr_is_equal(vlr->addr, addr) == true) + if (vlr->sock == sock) return vlr; }
View file
open5gs_2.7.2.4573.3396.tar.xz/src/mme/mme-context.h -> open5gs_2.7.2.4578.35a1.tar.xz/src/mme/mme-context.h
Changed
@@ -219,7 +219,6 @@ ogs_sockaddr_t *local_sa_list; /* VLR SGsAP Socket Local Address List */ ogs_sock_t *sock; /* VLR SGsAP Socket */ - ogs_sockaddr_t *addr; /* VLR SGsAP Connected Socket Address */ ogs_sockopt_t *option; /* VLR SGsAP Socket Option */ ogs_poll_t *poll; /* VLR SGsAP Poll */ } mme_vlr_t; @@ -946,7 +945,7 @@ void mme_vlr_remove(mme_vlr_t *vlr); void mme_vlr_remove_all(void); void mme_vlr_close(mme_vlr_t *vlr); -mme_vlr_t *mme_vlr_find_by_addr(const ogs_sockaddr_t *addr); +mme_vlr_t *mme_vlr_find_by_sock(const ogs_sock_t *sock); mme_csmap_t *mme_csmap_add(mme_vlr_t *vlr); void mme_csmap_remove(mme_csmap_t *csmap);
View file
open5gs_2.7.2.4573.3396.tar.xz/src/mme/mme-event.c -> open5gs_2.7.2.4578.35a1.tar.xz/src/mme/mme-event.c
Changed
@@ -117,7 +117,6 @@ ogs_assert(id); ogs_assert(sock); - ogs_assert(addr); e = mme_event_new(id); ogs_assert(e);
View file
open5gs_2.7.2.4573.3396.tar.xz/src/mme/mme-sm.c -> open5gs_2.7.2.4578.35a1.tar.xz/src/mme/mme-sm.c
Changed
@@ -54,6 +54,7 @@ void mme_state_operational(ogs_fsm_t *s, mme_event_t *e) { int rv; + char *sa_list_str = NULL; char bufOGS_ADDRSTRLEN; ogs_sock_t *sock = NULL; @@ -970,25 +971,20 @@ case MME_EVENT_SGSAP_LO_SCTP_COMM_UP: sock = e->sock; ogs_assert(sock); - addr = e->addr; - ogs_assert(addr); - - ogs_assert(addr->ogs_sa_family == AF_INET || - addr->ogs_sa_family == AF_INET6); max_num_of_ostreams = e->max_num_of_ostreams; - vlr = mme_vlr_find_by_addr(addr); - ogs_free(addr); - + vlr = mme_vlr_find_by_sock(sock); ogs_assert(vlr); ogs_assert(OGS_FSM_STATE(&vlr->sm)); vlr->max_num_of_ostreams = ogs_min(max_num_of_ostreams, vlr->max_num_of_ostreams); - ogs_debug("VLR-SGs SCTP_COMM_UP%s Max Num of Outbound Streams%d", - OGS_ADDR(vlr->addr, buf), vlr->max_num_of_ostreams); + sa_list_str = ogs_sockaddr_strdup(vlr->sa_list); + ogs_debug("VLR-SGs SCTP_COMM_UP %s Max Num of Outbound Streams%d", + sa_list_str, vlr->max_num_of_ostreams); + ogs_free(sa_list_str); e->vlr = vlr; ogs_fsm_dispatch(&vlr->sm, e); @@ -997,45 +993,32 @@ case MME_EVENT_SGSAP_LO_CONNREFUSED: sock = e->sock; ogs_assert(sock); - addr = e->addr; - ogs_assert(addr); - - ogs_assert(addr->ogs_sa_family == AF_INET || - addr->ogs_sa_family == AF_INET6); - - vlr = mme_vlr_find_by_addr(addr); - ogs_free(addr); + vlr = mme_vlr_find_by_sock(sock); ogs_assert(vlr); ogs_assert(OGS_FSM_STATE(&vlr->sm)); + sa_list_str = ogs_sockaddr_strdup(vlr->sa_list); if (OGS_FSM_CHECK(&vlr->sm, sgsap_state_connected)) { e->vlr = vlr; ogs_fsm_dispatch(&vlr->sm, e); - ogs_info("VLR-SGs%s connection refused!!!", - OGS_ADDR(vlr->addr, buf)); + ogs_info("VLR-SGs %s connection refused!!!", sa_list_str); } else { - ogs_warn("VLR-SGs%s connection refused, Already Removed!", - OGS_ADDR(vlr->addr, buf)); + ogs_warn("VLR-SGs %s connection refused, Already Removed!", + sa_list_str); } + ogs_free(sa_list_str); break; case MME_EVENT_SGSAP_MESSAGE: sock = e->sock; ogs_assert(sock); - addr = e->addr; - ogs_assert(addr); pkbuf = e->pkbuf; ogs_assert(pkbuf); - ogs_assert(addr->ogs_sa_family == AF_INET || - addr->ogs_sa_family == AF_INET6); - - vlr = mme_vlr_find_by_addr(addr); - ogs_free(addr); - + vlr = mme_vlr_find_by_sock(sock); ogs_assert(vlr); ogs_assert(OGS_FSM_STATE(&vlr->sm));
View file
open5gs_2.7.2.4573.3396.tar.xz/src/mme/sgsap-path.c -> open5gs_2.7.2.4578.35a1.tar.xz/src/mme/sgsap-path.c
Changed
@@ -53,8 +53,7 @@ } } -int sgsap_send(ogs_sock_t *sock, ogs_pkbuf_t *pkbuf, - ogs_sockaddr_t *addr, uint16_t stream_no) +int sgsap_send(ogs_sock_t *sock, ogs_pkbuf_t *pkbuf, uint16_t stream_no) { int sent; @@ -62,7 +61,7 @@ ogs_assert(pkbuf); sent = ogs_sctp_sendmsg(sock, pkbuf->data, pkbuf->len, - addr, OGS_SCTP_SGSAP_PPID, stream_no); + NULL, OGS_SCTP_SGSAP_PPID, stream_no); if (sent < 0 || sent != pkbuf->len) { ogs_error("ogs_sctp_sendmsg(len:%d,ssn:%d) error (%d:%s)", pkbuf->len, stream_no, errno, strerror(errno)); @@ -77,7 +76,7 @@ int sgsap_send_to_vlr_with_sid( mme_vlr_t *vlr, ogs_pkbuf_t *pkbuf, uint16_t stream_no) { - char bufOGS_ADDRSTRLEN; + char *sa_list_str = NULL; ogs_sock_t *sock = NULL;; ogs_assert(vlr); @@ -85,8 +84,11 @@ sock = vlr->sock; ogs_assert(sock); - ogs_debug(" VLR-IP%s", OGS_ADDR(vlr->addr, buf)); - return sgsap_send(sock, pkbuf, vlr->addr, stream_no); + sa_list_str = ogs_sockaddr_strdup(vlr->sa_list); + ogs_debug(" StreamNO%d VLR-IP%s", stream_no, sa_list_str); + ogs_free(sa_list_str); + + return sgsap_send(sock, pkbuf, stream_no); } int sgsap_send_to_vlr(mme_ue_t *mme_ue, ogs_pkbuf_t *pkbuf)
View file
open5gs_2.7.2.4573.3396.tar.xz/src/mme/sgsap-path.h -> open5gs_2.7.2.4578.35a1.tar.xz/src/mme/sgsap-path.h
Changed
@@ -36,8 +36,7 @@ ogs_sock_t *sgsap_client(mme_vlr_t *vlr); -int sgsap_send(ogs_sock_t *sock, - ogs_pkbuf_t *pkbuf, ogs_sockaddr_t *addr, uint16_t stream_no); +int sgsap_send(ogs_sock_t *sock, ogs_pkbuf_t *pkbuf, uint16_t stream_no); int sgsap_send_to_vlr_with_sid( mme_vlr_t *vlr, ogs_pkbuf_t *pkbuf, uint16_t stream_no);
View file
open5gs_2.7.2.4573.3396.tar.xz/src/mme/sgsap-sctp.c -> open5gs_2.7.2.4578.35a1.tar.xz/src/mme/sgsap-sctp.c
Changed
@@ -34,43 +34,26 @@ ogs_sock_t *sgsap_client(mme_vlr_t *vlr) { - char bufOGS_ADDRSTRLEN; + char *sa_list_str = NULL; ogs_sock_t *sock = NULL; ogs_assert(vlr); - sock = ogs_sctp_client(SOCK_SEQPACKET, + sock = ogs_sctp_client(SOCK_STREAM, vlr->sa_list, vlr->local_sa_list, vlr->option); if (sock) { vlr->sock = sock; #if HAVE_USRSCTP - vlr->addr = vlr->sa_list; usrsctp_set_non_blocking((struct socket *)sock, 1); usrsctp_set_upcall((struct socket *)sock, usrsctp_recv_handler, NULL); #else - -/* - * Originally, the code assigned vlr->addr to the address of sock->remote_addr: - * vlr->addr = &sock->remote_addr; - * However, when using sctp_connectx, it was not easy to set remote_addr. - * Therefore, at this point, vlr->addr is now assigned to vlr->sa_list, - * utilizing the initially used address: - * vlr->addr = vlr->sa_list; - * - * This approach may lead to issues when connecting to multiple addresses, - * as subsequent addresses cannot be accurately compared using the 'from' - * parameter in sctp_recvmsg. - * - * Since a proper solution is deferred, it is recommended to avoid using - * sctp_connectx with multiple addresses for the time being. - */ - vlr->addr = vlr->sa_list; vlr->poll = ogs_pollset_add(ogs_app()->pollset, OGS_POLLIN, sock->fd, lksctp_recv_handler, sock); ogs_assert(vlr->poll); #endif - ogs_info("sgsap client() %s:%d", - OGS_ADDR(vlr->addr, buf), OGS_PORT(vlr->addr)); + sa_list_str = ogs_sockaddr_strdup(vlr->sa_list); + ogs_info("sgsap client() %s", sa_list_str); + ogs_free(sa_list_str); } return sock; @@ -103,8 +86,6 @@ { ogs_pkbuf_t *pkbuf; int size; - ogs_sockaddr_t *addr = NULL; - ogs_sockaddr_t from; ogs_sctp_info_t sinfo; int flags = 0; @@ -114,7 +95,7 @@ ogs_assert(pkbuf); ogs_pkbuf_put(pkbuf, OGS_MAX_SDU_LEN); size = ogs_sctp_recvmsg( - sock, pkbuf->data, pkbuf->len, &from, &sinfo, &flags); + sock, pkbuf->data, pkbuf->len, NULL, &sinfo, &flags); if (size < 0 || size >= OGS_MAX_SDU_LEN) { ogs_error("ogs_sctp_recvmsg(%d) failed(%d:%s)", size, errno, strerror(errno)); @@ -139,12 +120,8 @@ if (not->sn_assoc_change.sac_state == SCTP_COMM_UP) { ogs_debug("SCTP_COMM_UP"); - addr = ogs_calloc(1, sizeof(ogs_sockaddr_t)); - ogs_assert(addr); - memcpy(addr, &from, sizeof(ogs_sockaddr_t)); - sgsap_event_push(MME_EVENT_SGSAP_LO_SCTP_COMM_UP, - sock, addr, NULL, + sock, NULL, NULL, not->sn_assoc_change.sac_inbound_streams, not->sn_assoc_change.sac_outbound_streams); } else if (not->sn_assoc_change.sac_state == SCTP_SHUTDOWN_COMP || @@ -155,12 +132,8 @@ if (not->sn_assoc_change.sac_state == SCTP_COMM_LOST) ogs_debug("SCTP_COMM_LOST"); - addr = ogs_calloc(1, sizeof(ogs_sockaddr_t)); - ogs_assert(addr); - memcpy(addr, &from, sizeof(ogs_sockaddr_t)); - sgsap_event_push(MME_EVENT_SGSAP_LO_CONNREFUSED, - sock, addr, NULL, 0, 0); + sock, NULL, NULL, 0, 0); } break; case SCTP_SHUTDOWN_EVENT : @@ -183,12 +156,8 @@ not->sn_send_failed.ssf_error); #endif - addr = ogs_calloc(1, sizeof(ogs_sockaddr_t)); - ogs_assert(addr); - memcpy(addr, &from, sizeof(ogs_sockaddr_t)); - sgsap_event_push(MME_EVENT_SGSAP_LO_CONNREFUSED, - sock, addr, NULL, 0, 0); + sock, NULL, NULL, 0, 0); break; case SCTP_PEER_ADDR_CHANGE: ogs_warn("SCTP_PEER_ADDR_CHANGE:T:%d, F:0x%x, S:%d", @@ -210,11 +179,7 @@ } else if (flags & MSG_EOR) { ogs_pkbuf_trim(pkbuf, size); - addr = ogs_calloc(1, sizeof(ogs_sockaddr_t)); - ogs_assert(addr); - memcpy(addr, &from, sizeof(ogs_sockaddr_t)); - - sgsap_event_push(MME_EVENT_SGSAP_MESSAGE, sock, addr, pkbuf, 0, 0); + sgsap_event_push(MME_EVENT_SGSAP_MESSAGE, sock, NULL, pkbuf, 0, 0); return; } else { if (ogs_socket_errno != OGS_EAGAIN) {
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
.