Projects
osmocom:nightly
open5gs
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 303
View file
open5gs_2.6.2.8.aed52.202304210026.dsc -> open5gs_2.6.2.15.7580d.202304220026.dsc
Changed
@@ -2,7 +2,7 @@ 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-ausf, open5gs-udm, open5gs-pcf, open5gs-nssf, open5gs-bsf, open5gs-udr, open5gs, open5gs-dbg Architecture: any -Version: 2.6.2.8.aed52.202304210026 +Version: 2.6.2.15.7580d.202304220026 Maintainer: Harald Welte <laforge@gnumonks.org> Uploaders: Sukchan Lee <acetcom@gmail.com> Homepage: https://open5gs.org @@ -31,8 +31,8 @@ open5gs-udr deb net optional arch=any open5gs-upf deb net optional arch=any Checksums-Sha1: - 8d11e58e6874d8f49f3e2ada725a0314b9e098b8 14115324 open5gs_2.6.2.8.aed52.202304210026.tar.xz + d0f4709f69f169fff892576263b677be4713a0dc 14115684 open5gs_2.6.2.15.7580d.202304220026.tar.xz Checksums-Sha256: - 0ff1e884e543d287c8cab7714e195762b55aa0f5771390218d4bb3efbe338a50 14115324 open5gs_2.6.2.8.aed52.202304210026.tar.xz + b35aefbb99b54658e6d98f90d8cd2f9f355f8ed060762996d115c01b7ab9b51f 14115684 open5gs_2.6.2.15.7580d.202304220026.tar.xz Files: - 4f8c1b4f1b347651c90d7d87c46c2a39 14115324 open5gs_2.6.2.8.aed52.202304210026.tar.xz + 526eb384b4f9b350672a5c5b76f58ade 14115684 open5gs_2.6.2.15.7580d.202304220026.tar.xz
View file
open5gs_2.6.2.8.aed52.202304210026.tar.xz/.tarball-version -> open5gs_2.6.2.15.7580d.202304220026.tar.xz/.tarball-version
Changed
@@ -1 +1 @@ -2.6.2.8-aed52.202304210026 +2.6.2.15-7580d.202304220026
View file
open5gs_2.6.2.8.aed52.202304210026.tar.xz/debian/changelog -> open5gs_2.6.2.15.7580d.202304220026.tar.xz/debian/changelog
Changed
@@ -1,8 +1,8 @@ -open5gs (2.6.2.8.aed52.202304210026) unstable; urgency=medium +open5gs (2.6.2.15.7580d.202304220026) unstable; urgency=medium * Automatically generated changelog entry for building the Osmocom nightly feed - -- Osmocom OBS scripts <info@osmocom.org> Fri, 21 Apr 2023 00:27:39 +0000 + -- Osmocom OBS scripts <info@osmocom.org> Sat, 22 Apr 2023 00:27:36 +0000 open5gs (2.6.2) unstable; urgency=medium
View file
open5gs_2.6.2.8.aed52.202304210026.tar.xz/docs/_pages/docs.md -> open5gs_2.6.2.15.7580d.202304220026.tar.xz/docs/_pages/docs.md
Changed
@@ -40,6 +40,7 @@ - @infinitydon - Open5GS on Amazon Elastic Kubernetes Service(https://aws.amazon.com/blogs/opensource/open-source-mobile-core-network-implementation-on-amazon-elastic-kubernetes-service/) - Kubernetes Open5GS Deployment(https://dev.to/infinitydon/virtual-4g-simulation-using-kubernetes-and-gns3-3b7k?fbclid=IwAR1p99h13a-mCfejanbBQe0H0-jp5grXkn5mWf1WrTHf47UtegB2-UHGGZQ) + - 5G Core SBI mTLS Using External Certificate PKI(https://futuredon.medium.com/5g-core-sbi-mtls-using-external-certificate-pki-4ffc02ac7728) - @nickvsnetworking - My first 5G Core : Open5GS and UERANSIM(http://nickvsnetworking.com/my-first-5g-core-open5gs-and-ueransim/)
View file
open5gs_2.6.2.8.aed52.202304210026.tar.xz/docs/_pages/support.md -> open5gs_2.6.2.15.7580d.202304220026.tar.xz/docs/_pages/support.md
Changed
@@ -21,7 +21,7 @@ We work with leading partners in mobile communications to offer our customers complete solutions. -**NextEPC(https://nextepc.com/)**: Established in U.S. in 2019, NextEPC Inc. provides the latest wireless telecommunications technologies and outstanding support to wireless solution providers and vendors around the world. Their solutions include scalable and versatile 4G/5G core network systems. They also offer professional development and customization services for Enterprise users. +**NextEPC(https://nextepc.com/)**: Established in U.S. in 2019, NextEPC Inc. provides the latest wireless telecommunications technologies and outstanding support to wireless solution providers and vendors around the world. Their solutions include scalable and versatile 4G/5G core network systems, recently a commercial-grade DPDK-accelerated UPF is also available. They offer professional development and customization services for Enterprise users. Please contact sales@nextepc.com(mailto:sales@nextepc.com) for more informations.
View file
open5gs_2.6.2.8.aed52.202304210026.tar.xz/lib/proto/types.h -> open5gs_2.6.2.15.7580d.202304220026.tar.xz/lib/proto/types.h
Changed
@@ -80,6 +80,7 @@ #define OGS_MAX_DNN_LEN 100 #define OGS_MAX_APN_LEN OGS_MAX_DNN_LEN #define OGS_MAX_PCO_LEN 251 +#define OGS_MAX_EPCO_LEN 65535 #define OGS_MAX_FQDN_LEN 256 #define OGS_MAX_NUM_OF_SERVED_GUAMI 8
View file
open5gs_2.6.2.8.aed52.202304210026.tar.xz/lib/sbi/context.c -> open5gs_2.6.2.15.7580d.202304220026.tar.xz/lib/sbi/context.c
Changed
@@ -122,8 +122,6 @@ static int ogs_sbi_context_prepare(void) { - self.sbi_port = OGS_SBI_HTTP_PORT; - #if ENABLE_ACCEPT_ENCODING self.content_encoding = "gzip"; #endif @@ -242,7 +240,7 @@ int num_of_advertise = 0; const char *advertiseOGS_MAX_NUM_OF_HOSTNAME; - uint16_t port = self.sbi_port; + uint16_t port = ogs_sbi_server_default_port(); const char *dev = NULL; ogs_sockaddr_t *addr = NULL; @@ -410,7 +408,7 @@ rv = ogs_socknode_probe( ogs_app()->parameter.no_ipv4 ? NULL : &list, ogs_app()->parameter.no_ipv6 ? NULL : &list6, - NULL, self.sbi_port, NULL); + NULL, ogs_sbi_server_default_port(), NULL); ogs_assert(rv == OGS_OK); node = ogs_list_first(&list); @@ -506,7 +504,7 @@ int family = AF_UNSPEC; int i, num = 0; const char *hostnameOGS_MAX_NUM_OF_HOSTNAME; - uint16_t port = self.sbi_port; + uint16_t port = ogs_sbi_client_default_port(); if (ogs_yaml_iter_type(&sbi_array) == YAML_MAPPING_NODE) { @@ -583,10 +581,7 @@ if (addr == NULL) continue; client = ogs_sbi_client_add( - ogs_app()->sbi.client.no_tls == false ? - OpenAPI_uri_scheme_https : - OpenAPI_uri_scheme_http, - addr); + ogs_sbi_client_default_scheme(), addr); ogs_assert(client); OGS_SBI_SETUP_CLIENT(self.nrf_instance, client); @@ -612,7 +607,7 @@ int family = AF_UNSPEC; int i, num = 0; const char *hostnameOGS_MAX_NUM_OF_HOSTNAME; - uint16_t port = self.sbi_port; + uint16_t port = ogs_sbi_client_default_port(); if (ogs_yaml_iter_type(&sbi_array) == YAML_MAPPING_NODE) { @@ -689,10 +684,7 @@ if (addr == NULL) continue; client = ogs_sbi_client_add( - ogs_app()->sbi.client.no_tls == false ? - OpenAPI_uri_scheme_https : - OpenAPI_uri_scheme_http, - addr); + ogs_sbi_client_default_scheme(), addr); ogs_assert(client); OGS_SBI_SETUP_CLIENT(self.scp_instance, client); @@ -1404,6 +1396,7 @@ } if (nf_service->num_of_addr < OGS_SBI_MAX_NUM_OF_IP_ADDRESS) { + bool is_port = true; int port = 0; ogs_sockaddr_t *addr = NULL; ogs_assert(OGS_OK == ogs_copyaddrinfo(&addr, advertise)); @@ -1411,11 +1404,12 @@ port = OGS_PORT(addr); if (nf_service->scheme == OpenAPI_uri_scheme_https) { - if (port == OGS_SBI_HTTPS_PORT) port = 0; + if (port == OGS_SBI_HTTPS_PORT) is_port = false; } else if (nf_service->scheme == OpenAPI_uri_scheme_http) { - if (port == OGS_SBI_HTTP_PORT) port = 0; + if (port == OGS_SBI_HTTP_PORT) is_port = false; } + nf_service->addrnf_service->num_of_addr.is_port = is_port; nf_service->addrnf_service->num_of_addr.port = port; if (addr->ogs_sa_family == AF_INET) { nf_service->addrnf_service->num_of_addr.ipv4 = addr; @@ -1439,17 +1433,21 @@ } static ogs_sbi_client_t *find_client_by_fqdn( - OpenAPI_uri_scheme_e scheme, char *fqdn, int port) + OpenAPI_uri_scheme_e scheme, char *fqdn) { int rv; ogs_sockaddr_t *addr = NULL; ogs_sbi_client_t *client = NULL; - ogs_assert(scheme); + ogs_assert(scheme == OpenAPI_uri_scheme_https || + scheme == OpenAPI_uri_scheme_http); ogs_assert(fqdn); - rv = ogs_getaddrinfo(&addr, AF_UNSPEC, fqdn, - port ? port : ogs_sbi_self()->sbi_port, 0); + rv = ogs_getaddrinfo( + &addr, AF_UNSPEC, fqdn, + scheme == OpenAPI_uri_scheme_https ? + OGS_SBI_HTTPS_PORT : OGS_SBI_HTTP_PORT, + 0); if (rv != OGS_OK) { ogs_error("Invalid NFProfile.fqdn"); return NULL; @@ -1473,11 +1471,10 @@ ogs_sockaddr_t *addr = NULL; OpenAPI_uri_scheme_e scheme = OpenAPI_uri_scheme_NULL; - scheme = ogs_app()->sbi.client.no_tls == false ? - OpenAPI_uri_scheme_https : OpenAPI_uri_scheme_http; + scheme = ogs_sbi_client_default_scheme(); if (nf_instance->fqdn) - client = find_client_by_fqdn(scheme, nf_instance->fqdn, 0); + client = find_client_by_fqdn(scheme, nf_instance->fqdn); if (!client) { /* At this point, CLIENT selection method is very simple. */ @@ -1504,7 +1501,7 @@ ogs_assert(nf_service->scheme); if (nf_service->fqdn) - client = find_client_by_fqdn(nf_service->scheme, nf_service->fqdn, 0); + client = find_client_by_fqdn(nf_service->scheme, nf_service->fqdn); if (!client) { /* At this point, CLIENT selection method is very simple. */ @@ -1620,9 +1617,28 @@ nf_service_associate_client_all(nf_instance); } -OpenAPI_uri_scheme_e ogs_sbi_default_uri_scheme(void) +OpenAPI_uri_scheme_e ogs_sbi_server_default_scheme(void) +{ + return ogs_app()->sbi.server.no_tls == false ? + OpenAPI_uri_scheme_https : OpenAPI_uri_scheme_http; +} + +OpenAPI_uri_scheme_e ogs_sbi_client_default_scheme(void) +{ + return ogs_app()->sbi.client.no_tls == false ? + OpenAPI_uri_scheme_https : OpenAPI_uri_scheme_http; +} + +int ogs_sbi_server_default_port(void) +{ + return ogs_app()->sbi.server.no_tls == false ? + OGS_SBI_HTTPS_PORT : OGS_SBI_HTTP_PORT; +} + +int ogs_sbi_client_default_port(void) { - return OpenAPI_uri_scheme_http; + return ogs_app()->sbi.client.no_tls == false ? + OGS_SBI_HTTPS_PORT : OGS_SBI_HTTP_PORT; } ogs_sbi_client_t *ogs_sbi_client_find_by_service_name(
View file
open5gs_2.6.2.8.aed52.202304210026.tar.xz/lib/sbi/context.h -> open5gs_2.6.2.15.7580d.202304220026.tar.xz/lib/sbi/context.h
Changed
@@ -58,8 +58,6 @@ uint8_t keyOGS_ECCKEY_LEN; /* 32 bytes Private Key */ } hnetOGS_HOME_NETWORK_PKI_VALUE_MAX+1; /* PKI Value : 1 ~ 254 */ - uint16_t sbi_port; /* SBI local port */ - ogs_list_t server_list; ogs_list_t client_list; @@ -218,6 +216,7 @@ struct { ogs_sockaddr_t *ipv4; ogs_sockaddr_t *ipv6; + bool is_port; int port; } addrOGS_SBI_MAX_NUM_OF_IP_ADDRESS; @@ -401,7 +400,10 @@ void ogs_sbi_client_associate(ogs_sbi_nf_instance_t *nf_instance); -OpenAPI_uri_scheme_e ogs_sbi_default_uri_scheme(void); +OpenAPI_uri_scheme_e ogs_sbi_server_default_scheme(void); +OpenAPI_uri_scheme_e ogs_sbi_client_default_scheme(void); +int ogs_sbi_server_default_port(void); +int ogs_sbi_client_default_port(void); #define OGS_SBI_SETUP_NF_INSTANCE(__cTX, __nFInstance) \ do { \
View file
open5gs_2.6.2.8.aed52.202304210026.tar.xz/lib/sbi/nnrf-build.c -> open5gs_2.6.2.15.7580d.202304220026.tar.xz/lib/sbi/nnrf-build.c
Changed
@@ -569,7 +569,7 @@ return NULL; } } - IpEndPoint->is_port = true; + IpEndPoint->is_port = nf_service->addri.is_port; IpEndPoint->port = nf_service->addri.port; OpenAPI_list_add(IpEndPointList, IpEndPoint); }
View file
open5gs_2.6.2.8.aed52.202304210026.tar.xz/lib/sbi/nnrf-handler.c -> open5gs_2.6.2.15.7580d.202304220026.tar.xz/lib/sbi/nnrf-handler.c
Changed
@@ -83,7 +83,7 @@ if (nf_instance->num_of_ipv4 < OGS_SBI_MAX_NUM_OF_IP_ADDRESS) { rv = ogs_getaddrinfo(&addr, AF_UNSPEC, - node->data, ogs_sbi_self()->sbi_port, 0); + node->data, ogs_sbi_client_default_port(), 0); if (rv != OGS_OK) continue; nf_instance->ipv4nf_instance->num_of_ipv4 = addr; @@ -101,7 +101,7 @@ if (nf_instance->num_of_ipv6 < OGS_SBI_MAX_NUM_OF_IP_ADDRESS) { rv = ogs_getaddrinfo(&addr, AF_UNSPEC, - node->data, ogs_sbi_self()->sbi_port, 0); + node->data, ogs_sbi_client_default_port(), 0); if (rv != OGS_OK) continue; nf_instance->ipv6nf_instance->num_of_ipv6 = addr; @@ -257,18 +257,10 @@ } if (nf_service->num_of_addr < OGS_SBI_MAX_NUM_OF_IP_ADDRESS) { - if (!IpEndPoint->is_port) { - if (nf_service->scheme == OpenAPI_uri_scheme_http) - port = OGS_SBI_HTTP_PORT; - else if (nf_service->scheme == OpenAPI_uri_scheme_https) - port = OGS_SBI_HTTPS_PORT; - else { - ogs_error("Invalid scheme %d", nf_service->scheme); - continue; - } - } else { + if (!IpEndPoint->is_port) + port = ogs_sbi_client_default_port(); + else port = IpEndPoint->port; - } if (IpEndPoint->ipv4_address) { rv = ogs_getaddrinfo(&addr, AF_UNSPEC, @@ -291,6 +283,8 @@ if (addr || addr6) { nf_service->addrnf_service->num_of_addr. + is_port = IpEndPoint->is_port; + nf_service->addrnf_service->num_of_addr. port = port; nf_service->addrnf_service->num_of_addr. ipv4 = addr;
View file
open5gs_2.6.2.8.aed52.202304210026.tar.xz/src/amf/context.c -> open5gs_2.6.2.15.7580d.202304220026.tar.xz/src/amf/context.c
Changed
@@ -2112,9 +2112,6 @@ if (sess->nssf.nrf.client) ogs_sbi_client_remove(sess->nssf.nrf.client); - OGS_NAS_CLEAR_DATA(&sess->ue_pco); - OGS_TLV_CLEAR_DATA(&sess->pgw_pco); - ogs_pool_free(&amf_sess_pool, sess); stats_remove_amf_session();
View file
open5gs_2.6.2.8.aed52.202304210026.tar.xz/src/amf/context.h -> open5gs_2.6.2.15.7580d.202304220026.tar.xz/src/amf/context.h
Changed
@@ -648,15 +648,6 @@ ogs_s_nssai_t mapped_hplmn; char *dnn; - /* Save Protocol Configuration Options from UE */ - struct { - uint8_t length; - uint8_t *buffer; - } ue_pco; - - /* Save Protocol Configuration Options from PGW */ - ogs_tlv_octet_t pgw_pco; - } amf_sess_t; void amf_context_init(void);
View file
open5gs_2.6.2.8.aed52.202304210026.tar.xz/src/bsf/context.h -> open5gs_2.6.2.15.7580d.202304220026.tar.xz/src/bsf/context.h
Changed
@@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2022 by Sukchan Lee <acetcom@gmail.com> + * Copyright (C) 2019-2023 by Sukchan Lee <acetcom@gmail.com> * * This file is part of Open5GS. * @@ -71,6 +71,7 @@ struct { char *addr; char *addr6; + bool is_port; int port; } pcf_ipOGS_SBI_MAX_NUM_OF_IP_ADDRESS;
View file
open5gs_2.6.2.8.aed52.202304210026.tar.xz/src/bsf/nbsf-handler.c -> open5gs_2.6.2.15.7580d.202304220026.tar.xz/src/bsf/nbsf-handler.c
Changed
@@ -1,5 +1,5 @@ /* - * Copyright (C) 2019,2020 by Sukchan Lee <acetcom@gmail.com> + * Copyright (C) 2019-2023 by Sukchan Lee <acetcom@gmail.com> * * This file is part of Open5GS. * @@ -148,27 +148,10 @@ OpenAPI_list_for_each(PcfIpEndPointList, node) { OpenAPI_ip_end_point_t *IpEndPoint = node->data; - int port = 0; if (!IpEndPoint) continue; if (sess->num_of_pcf_ip < OGS_SBI_MAX_NUM_OF_IP_ADDRESS) { - if (!IpEndPoint->is_port) { - if (ogs_sbi_default_uri_scheme() == - OpenAPI_uri_scheme_http) - port = OGS_SBI_HTTP_PORT; - else if (ogs_sbi_default_uri_scheme() == - OpenAPI_uri_scheme_https) - port = OGS_SBI_HTTPS_PORT; - else { - ogs_fatal("Invalid scheme %d", - ogs_sbi_default_uri_scheme()); - ogs_assert_if_reached(); - } - } else { - port = IpEndPoint->port; - } - if (IpEndPoint->ipv4_address || IpEndPoint->ipv6_address) { if (IpEndPoint->ipv4_address) { @@ -179,7 +162,12 @@ sess->pcf_ipsess->num_of_pcf_ip.addr6 = ogs_strdup(IpEndPoint->ipv6_address); } - sess->pcf_ipsess->num_of_pcf_ip.port = port; + if (IpEndPoint->is_port) { + sess->pcf_ipsess->num_of_pcf_ip.is_port = + IpEndPoint->is_port; + sess->pcf_ipsess->num_of_pcf_ip.port = + IpEndPoint->port; + } sess->num_of_pcf_ip++; } } @@ -259,7 +247,7 @@ PcfIpEndPoint->ipv4_address = sess->pcf_ipi.addr; PcfIpEndPoint->ipv6_address = sess->pcf_ipi.addr6; - PcfIpEndPoint->is_port = true; + PcfIpEndPoint->is_port = sess->pcf_ipi.is_port; PcfIpEndPoint->port = sess->pcf_ipi.port; OpenAPI_list_add(PcfIpEndPointList, PcfIpEndPoint);
View file
open5gs_2.6.2.8.aed52.202304210026.tar.xz/src/mme/esm-build.c -> open5gs_2.6.2.15.7580d.202304220026.tar.xz/src/mme/esm-build.c
Changed
@@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com> + * Copyright (C) 2019-2023 by Sukchan Lee <acetcom@gmail.com> * * This file is part of Open5GS. * @@ -228,21 +228,20 @@ apn_ambr_build(apn_ambr, session->ambr.downlink, session->ambr.uplink); } - if (sess->pgw_pco.presence && sess->pgw_pco.len && sess->pgw_pco.data) { - if (mme_ue->ue_network_capability. - extended_protocol_configuration_options) { - activate_default_eps_bearer_context_request->presencemask |= - OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; - extended_protocol_configuration_options->length = sess->pgw_pco.len; - extended_protocol_configuration_options->buffer = - sess->pgw_pco.data; - } else { - activate_default_eps_bearer_context_request->presencemask |= - OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; - protocol_configuration_options->length = sess->pgw_pco.len; - memcpy(protocol_configuration_options->buffer, - sess->pgw_pco.data, protocol_configuration_options->length); - } + if (sess->pgw_epco.presence && sess->pgw_epco.len && sess->pgw_epco.data) { + activate_default_eps_bearer_context_request->presencemask |= + OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; + extended_protocol_configuration_options->length = + sess->pgw_epco.len; + extended_protocol_configuration_options->buffer = + sess->pgw_epco.data; + } else if (sess->pgw_pco.presence && sess->pgw_pco.len && + sess->pgw_pco.data) { + activate_default_eps_bearer_context_request->presencemask |= + OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; + protocol_configuration_options->length = sess->pgw_pco.len; + memcpy(protocol_configuration_options->buffer, + sess->pgw_pco.data, protocol_configuration_options->length); } if (create_action == OGS_GTP_CREATE_IN_ATTACH_REQUEST)
View file
open5gs_2.6.2.8.aed52.202304210026.tar.xz/src/mme/esm-handler.c -> open5gs_2.6.2.15.7580d.202304220026.tar.xz/src/mme/esm-handler.c
Changed
@@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com> + * Copyright (C) 2019-2023 by Sukchan Lee <acetcom@gmail.com> * * This file is part of Open5GS. * @@ -106,9 +106,17 @@ } if (req->presencemask & + OGS_NAS_EPS_PDN_CONNECTIVITY_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { + ogs_nas_extended_protocol_configuration_options_t + *extended_protocol_configuration_options = + &req->extended_protocol_configuration_options; + + OGS_NAS_STORE_DATA(&sess->ue_epco, + extended_protocol_configuration_options); + } else if (req->presencemask & OGS_NAS_EPS_PDN_CONNECTIVITY_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { ogs_nas_protocol_configuration_options_t - *protocol_configuration_options = + *protocol_configuration_options = &req->protocol_configuration_options; OGS_NAS_STORE_DATA(&sess->ue_pco, protocol_configuration_options); @@ -182,9 +190,17 @@ } if (rsp->presencemask & + OGS_NAS_EPS_ESM_INFORMATION_RESPONSE_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { + ogs_nas_extended_protocol_configuration_options_t + *extended_protocol_configuration_options = + &rsp->extended_protocol_configuration_options; + + OGS_NAS_STORE_DATA(&sess->ue_epco, + extended_protocol_configuration_options); + } else if (rsp->presencemask & OGS_NAS_EPS_ESM_INFORMATION_RESPONSE_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { ogs_nas_protocol_configuration_options_t - *protocol_configuration_options = + *protocol_configuration_options = &rsp->protocol_configuration_options; OGS_NAS_STORE_DATA(&sess->ue_pco, protocol_configuration_options); }
View file
open5gs_2.6.2.8.aed52.202304210026.tar.xz/src/mme/mme-context.c -> open5gs_2.6.2.15.7580d.202304220026.tar.xz/src/mme/mme-context.c
Changed
@@ -3260,7 +3260,9 @@ mme_bearer_remove_all(sess); OGS_NAS_CLEAR_DATA(&sess->ue_pco); + OGS_NAS_CLEAR_DATA(&sess->ue_epco); OGS_TLV_CLEAR_DATA(&sess->pgw_pco); + OGS_TLV_CLEAR_DATA(&sess->pgw_epco); ogs_pool_free(&mme_sess_pool, sess);
View file
open5gs_2.6.2.8.aed52.202304210026.tar.xz/src/mme/mme-context.h -> open5gs_2.6.2.15.7580d.202304220026.tar.xz/src/mme/mme-context.h
Changed
@@ -641,8 +641,17 @@ uint8_t *buffer; } ue_pco; + /* Save Extended Protocol Configuration Options from UE */ + struct { + uint16_t length; + uint8_t *buffer; + } ue_epco; + /* Save Protocol Configuration Options from PGW */ ogs_tlv_octet_t pgw_pco; + + /* Save Extended Protocol Configuration Options from PGW */ + ogs_tlv_octet_t pgw_epco; } mme_sess_t; #define MME_HAVE_ENB_S1U_PATH(__bEARER) \
View file
open5gs_2.6.2.8.aed52.202304210026.tar.xz/src/mme/mme-s11-build.c -> open5gs_2.6.2.15.7580d.202304220026.tar.xz/src/mme/mme-s11-build.c
Changed
@@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com> + * Copyright (C) 2019-2023 by Sukchan Lee <acetcom@gmail.com> * * This file is part of Open5GS. * @@ -253,7 +253,13 @@ req->aggregate_maximum_bit_rate.len = sizeof(ambr); } - if (sess->ue_pco.length && sess->ue_pco.buffer) { + if (sess->ue_epco.length && sess->ue_epco.buffer) { + req->extended_protocol_configuration_options.presence = 1; + req->extended_protocol_configuration_options.data = + sess->ue_epco.buffer; + req->extended_protocol_configuration_options.len = + sess->ue_epco.length; + } else if (sess->ue_pco.length && sess->ue_pco.buffer) { req->protocol_configuration_options.presence = 1; req->protocol_configuration_options.data = sess->ue_pco.buffer; req->protocol_configuration_options.len = sess->ue_pco.length;
View file
open5gs_2.6.2.8.aed52.202304210026.tar.xz/src/mme/mme-s11-handler.c -> open5gs_2.6.2.15.7580d.202304220026.tar.xz/src/mme/mme-s11-handler.c
Changed
@@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com> + * Copyright (C) 2019-2023 by Sukchan Lee <acetcom@gmail.com> * * This file is part of Open5GS. * @@ -373,8 +373,13 @@ rsp->pdn_address_allocation.len); } + /* ePCO */ + if (rsp->extended_protocol_configuration_options.presence) { + OGS_TLV_STORE_DATA(&sess->pgw_epco, + &rsp->extended_protocol_configuration_options); + /* PCO */ - if (rsp->protocol_configuration_options.presence) { + } else if (rsp->protocol_configuration_options.presence) { OGS_TLV_STORE_DATA(&sess->pgw_pco, &rsp->protocol_configuration_options); }
View file
open5gs_2.6.2.8.aed52.202304210026.tar.xz/src/nssf/context.c -> open5gs_2.6.2.15.7580d.202304220026.tar.xz/src/nssf/context.c
Changed
@@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2022 by Sukchan Lee <acetcom@gmail.com> + * Copyright (C) 2019-2023 by Sukchan Lee <acetcom@gmail.com> * * This file is part of Open5GS. * @@ -110,7 +110,7 @@ int family = AF_UNSPEC; int i, num = 0; const char *hostnameOGS_MAX_NUM_OF_HOSTNAME; - uint16_t port = ogs_sbi_self()->sbi_port; + uint16_t port = ogs_sbi_server_default_port(); const char *dev = NULL; ogs_sockaddr_t *addr = NULL; const char *sst = NULL, *sd = NULL;
View file
open5gs_2.6.2.8.aed52.202304210026.tar.xz/src/pcf/nbsf-build.c -> open5gs_2.6.2.15.7580d.202304220026.tar.xz/src/pcf/nbsf-build.c
Changed
@@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com> + * Copyright (C) 2019-2023 by Sukchan Lee <acetcom@gmail.com> * * This file is part of Open5GS. * @@ -121,7 +121,7 @@ goto end; } } - IpEndPoint->is_port = true; + IpEndPoint->is_port = nf_service->addri.is_port; IpEndPoint->port = nf_service->addri.port; OpenAPI_list_add(PcfIpEndPointList, IpEndPoint); }
View file
open5gs_2.6.2.8.aed52.202304210026.tar.xz/src/smf/context.c -> open5gs_2.6.2.15.7580d.202304220026.tar.xz/src/smf/context.c
Changed
@@ -1667,12 +1667,13 @@ ogs_fsm_fini(&sess->sm, &e); OGS_TLV_CLEAR_DATA(&sess->gtp.ue_pco); + OGS_TLV_CLEAR_DATA(&sess->gtp.ue_epco); OGS_TLV_CLEAR_DATA(&sess->gtp.user_location_information); OGS_TLV_CLEAR_DATA(&sess->gtp.ue_timezone); OGS_TLV_CLEAR_DATA(&sess->gtp.charging_characteristics); OGS_TLV_CLEAR_DATA(&sess->gtp.v1.qos); - OGS_NAS_CLEAR_DATA(&sess->nas.ue_pco); + OGS_NAS_CLEAR_DATA(&sess->nas.ue_epco); for (i = 0; i < sess->policy.num_of_pcc_rule; i++) OGS_PCC_RULE_FREE(&sess->policy.pcc_rulei);
View file
open5gs_2.6.2.8.aed52.202304210026.tar.xz/src/smf/context.h -> open5gs_2.6.2.15.7580d.202304220026.tar.xz/src/smf/context.h
Changed
@@ -325,6 +325,7 @@ struct { uint8_t version; /* GTPC version */ ogs_tlv_octet_t ue_pco; + ogs_tlv_octet_t ue_epco; ogs_tlv_octet_t user_location_information; ogs_tlv_octet_t ue_timezone; ogs_tlv_octet_t charging_characteristics; @@ -354,7 +355,7 @@ } gy; struct { - ogs_nas_extended_protocol_configuration_options_t ue_pco; + ogs_nas_extended_protocol_configuration_options_t ue_epco; } nas; /* Saved from NAS-5GS */ struct {
View file
open5gs_2.6.2.8.aed52.202304210026.tar.xz/src/smf/gsm-build.c -> open5gs_2.6.2.15.7580d.202304220026.tar.xz/src/smf/gsm-build.c
Changed
@@ -1,5 +1,5 @@ /* - * Copyright (C) 2019,2020 by Sukchan Lee <acetcom@gmail.com> + * Copyright (C) 2019-2023 by Sukchan Lee <acetcom@gmail.com> * * This file is part of Open5GS. * @@ -48,8 +48,8 @@ ogs_nas_qos_flow_description_t qos_flow_descriptionOGS_NAS_MAX_NUM_OF_QOS_FLOW_DESCRIPTION; - uint8_t pco_bufOGS_MAX_PCO_LEN; - int16_t pco_len; + uint8_t *epco_buf = NULL; + int16_t epco_len; selected_pdu_session_type = &pdu_session_establishment_accept-> selected_pdu_session_type; @@ -134,11 +134,11 @@ rv = ogs_nas_build_qos_rules(authorized_qos_rules, qos_rule, 1); if (rv != OGS_OK) { ogs_error("ogs_nas_build_qos_rules() failed"); - return NULL; + goto cleanup; } if (!authorized_qos_rules->length) { ogs_error("No length"); - return NULL; + goto cleanup; } /* Session-AMBR */ @@ -167,7 +167,7 @@ pdu_address->length = OGS_NAS_PDU_ADDRESS_IPV4V6_LEN; } else { ogs_error("Unexpected PDN Type %u", pdu_address->pdn_type); - return NULL; + goto cleanup; } /* GSM cause */ @@ -211,22 +211,24 @@ authorized_qos_flow_descriptions, qos_flow_description, 1); if (rv != OGS_OK) { ogs_error("ogs_nas_build_qos_flow_descriptions() failed"); - return NULL; + goto cleanup; } if (!authorized_qos_flow_descriptions->length) { ogs_error("No length"); - return NULL; + goto cleanup; } /* Extended protocol configuration options */ - if (sess->nas.ue_pco.buffer && sess->nas.ue_pco.length) { - pco_len = smf_pco_build(pco_buf, - sess->nas.ue_pco.buffer, sess->nas.ue_pco.length); - ogs_assert(pco_len > 0); + if (sess->nas.ue_epco.buffer && sess->nas.ue_epco.length) { + epco_buf = ogs_calloc(OGS_MAX_EPCO_LEN, sizeof(uint8_t)); + ogs_assert(epco_buf); + epco_len = smf_pco_build(epco_buf, + sess->nas.ue_epco.buffer, sess->nas.ue_epco.length); + ogs_assert(epco_len > 0); pdu_session_establishment_accept->presencemask |= OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_ACCEPT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; - extended_protocol_configuration_options->buffer = pco_buf; - extended_protocol_configuration_options->length = pco_len; + extended_protocol_configuration_options->buffer = epco_buf; + extended_protocol_configuration_options->length = epco_len; } /* DNN */ @@ -240,8 +242,14 @@ pkbuf = ogs_nas_5gs_plain_encode(&message); ogs_assert(pkbuf); - ogs_free(authorized_qos_rules->buffer); - ogs_free(authorized_qos_flow_descriptions->buffer); +cleanup: + if (epco_buf) + ogs_free(epco_buf); + + if (authorized_qos_rules->buffer) + ogs_free(authorized_qos_rules->buffer); + if (authorized_qos_flow_descriptions->buffer) + ogs_free(authorized_qos_flow_descriptions->buffer); return pkbuf; }
View file
open5gs_2.6.2.8.aed52.202304210026.tar.xz/src/smf/gsm-handler.c -> open5gs_2.6.2.15.7580d.202304220026.tar.xz/src/smf/gsm-handler.c
Changed
@@ -1,5 +1,5 @@ /* - * Copyright (C) 2019,2020 by Sukchan Lee <acetcom@gmail.com> + * Copyright (C) 2019-2023 by Sukchan Lee <acetcom@gmail.com> * * This file is part of Open5GS. * @@ -62,7 +62,7 @@ if (pdu_session_establishment_request->presencemask & OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { - OGS_NAS_STORE_DATA(&sess->nas.ue_pco, + OGS_NAS_STORE_DATA(&sess->nas.ue_epco, &pdu_session_establishment_request-> extended_protocol_configuration_options); }
View file
open5gs_2.6.2.8.aed52.202304210026.tar.xz/src/smf/s5c-build.c -> open5gs_2.6.2.15.7580d.202304220026.tar.xz/src/smf/s5c-build.c
Changed
@@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com> + * Copyright (C) 2019-2023 by Sukchan Lee <acetcom@gmail.com> * * This file is part of Open5GS. * @@ -28,6 +28,8 @@ int rv; smf_bearer_t *bearer = NULL; + ogs_pkbuf_t *pkbuf = NULL; + ogs_gtp2_message_t gtp_message; ogs_gtp2_create_session_response_t *rsp = NULL; @@ -45,6 +47,8 @@ int len; uint8_t pco_bufOGS_MAX_PCO_LEN; int16_t pco_len; + uint8_t *epco_buf = NULL; + int16_t epco_len; ogs_debug("SMF Create Session Response"); @@ -85,7 +89,7 @@ &smf_s5c_teid, &len); if (rv != OGS_OK) { ogs_error("ogs_gtp2_sockaddr_to_f_teid() failed"); - return NULL; + goto cleanup; } rsp->pgw_s5_s8__s2a_s2b_f_teid_for_pmip_based_interface_or_for_gtp_based_control_plane_interface. presence = 1; @@ -141,6 +145,19 @@ rsp->protocol_configuration_options.len = pco_len; } + /* ePCO */ + if (sess->gtp.ue_epco.presence && + sess->gtp.ue_epco.len && sess->gtp.ue_epco.data) { + epco_buf = ogs_calloc(OGS_MAX_EPCO_LEN, sizeof(uint8_t)); + ogs_assert(epco_buf); + epco_len = smf_pco_build( + epco_buf, sess->gtp.ue_epco.data, sess->gtp.ue_epco.len); + ogs_assert(epco_len > 0); + rsp->extended_protocol_configuration_options.presence = 1; + rsp->extended_protocol_configuration_options.data = epco_buf; + rsp->extended_protocol_configuration_options.len = epco_len; + } + i = 0; ogs_list_for_each(&sess->bearer_list, bearer) { ogs_assert(i < OGS_BEARER_PER_UE); @@ -190,7 +207,7 @@ &pgw_s5u_teidi, &pgw_s5u_leni); if (rv != OGS_OK) { ogs_error("ogs_gtp2_sockaddr_to_f_teid() failed"); - return NULL; + goto cleanup; } switch (sess->gtp_rat_type) { @@ -219,18 +236,28 @@ } gtp_message.h.type = type; - return ogs_gtp2_build_msg(>p_message); + pkbuf = ogs_gtp2_build_msg(>p_message); + +cleanup: + if (epco_buf) + ogs_free(epco_buf); + + return pkbuf; } ogs_pkbuf_t *smf_s5c_build_delete_session_response( uint8_t type, smf_sess_t *sess) { + ogs_pkbuf_t *pkbuf = NULL; + ogs_gtp2_message_t gtp_message; ogs_gtp2_delete_session_response_t *rsp = NULL; ogs_gtp2_cause_t cause; uint8_t pco_bufOGS_MAX_PCO_LEN; int16_t pco_len; + uint8_t *epco_buf = NULL; + int16_t epco_len; /* prepare cause */ memset(&cause, 0, sizeof(cause)); @@ -257,11 +284,30 @@ rsp->protocol_configuration_options.len = pco_len; } + /* ePCO */ + if (sess->gtp.ue_epco.presence && + sess->gtp.ue_epco.len && sess->gtp.ue_epco.data) { + epco_buf = ogs_calloc(OGS_MAX_EPCO_LEN, sizeof(uint8_t)); + ogs_assert(epco_buf); + epco_len = smf_pco_build( + epco_buf, sess->gtp.ue_epco.data, sess->gtp.ue_epco.len); + ogs_assert(epco_len > 0); + rsp->extended_protocol_configuration_options.presence = 1; + rsp->extended_protocol_configuration_options.data = epco_buf; + rsp->extended_protocol_configuration_options.len = epco_len; + } + /* Private Extension */ /* build */ gtp_message.h.type = type; - return ogs_gtp2_build_msg(>p_message); + pkbuf = ogs_gtp2_build_msg(>p_message); + +cleanup: + if (epco_buf) + ogs_free(epco_buf); + + return pkbuf; } ogs_pkbuf_t *smf_s5c_build_modify_bearer_response(
View file
open5gs_2.6.2.8.aed52.202304210026.tar.xz/src/smf/s5c-handler.c -> open5gs_2.6.2.15.7580d.202304220026.tar.xz/src/smf/s5c-handler.c
Changed
@@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com> + * Copyright (C) 2019-2023 by Sukchan Lee <acetcom@gmail.com> * * This file is part of Open5GS. * @@ -347,8 +347,13 @@ sess->session.ambr.uplink = be32toh(ambr->uplink) * 1000; } + /* ePCO */ + if (req->extended_protocol_configuration_options.presence) { + OGS_TLV_STORE_DATA(&sess->gtp.ue_epco, + &req->extended_protocol_configuration_options); + /* PCO */ - if (req->protocol_configuration_options.presence) { + } else if (req->protocol_configuration_options.presence) { OGS_TLV_STORE_DATA(&sess->gtp.ue_pco, &req->protocol_configuration_options); } @@ -420,13 +425,24 @@ OGS_TLV_STORE_DATA(&sess->gtp.ue_pco, &req->protocol_configuration_options); } else { - /* + /* * Clear contents to reflect whether PCO IE was included or not as part * of session deletion procedure */ OGS_TLV_CLEAR_DATA(&sess->gtp.ue_pco); } + if (req->extended_protocol_configuration_options.presence) { + OGS_TLV_STORE_DATA(&sess->gtp.ue_epco, + &req->extended_protocol_configuration_options); + } else { + /* + * Clear contents to reflect whether PCO IE was included or not as part + * of session deletion procedure + */ + OGS_TLV_CLEAR_DATA(&sess->gtp.ue_epco); + } + ogs_debug(" SGW_S5C_TEID0x%x SMF_N4_TEID0x%x", sess->sgw_s5c_teid, sess->smf_n4_teid);
View file
open5gs_2.6.2.8.aed52.202304210026.tar.xz/src/upf/context.c -> open5gs_2.6.2.15.7580d.202304220026.tar.xz/src/upf/context.c
Changed
@@ -243,7 +243,8 @@ ogs_pool_free(&upf_n4_seid_pool, sess->upf_n4_seid_node); ogs_pool_free(&upf_sess_pool, sess); - + if (sess->apn_dnn) + ogs_free(sess->apn_dnn); upf_metrics_inst_global_dec(UPF_METR_GLOB_GAUGE_UPF_SESSIONNBR); ogs_info("Removed Number of UPF-sessions is now %d",
View file
open5gs_2.6.2.8.aed52.202304210026.tar.xz/src/upf/context.h -> open5gs_2.6.2.15.7580d.202304220026.tar.xz/src/upf/context.h
Changed
@@ -122,6 +122,7 @@ /* Accounting: */ upf_sess_urr_acc_t urr_accOGS_MAX_NUM_OF_URR; /* FIXME: This probably needs to be mved to a hashtable or alike */ + char *apn_dnn; /* APN/DNN Item */ } upf_sess_t; void upf_context_init(void);
View file
open5gs_2.6.2.8.aed52.202304210026.tar.xz/src/upf/metrics.c -> open5gs_2.6.2.15.7580d.202304220026.tar.xz/src/upf/metrics.c
Changed
@@ -286,7 +286,7 @@ ogs_assert(dnn_key); if (dnn) { - strcpy(dnn_key->dnn, dnn); + ogs_cpystrn(dnn_key->dnn, dnn, ogs_min(strlen(dnn), OGS_MAX_DNN_LEN)+1); } else { dnn_key->dnn0 = '\0'; }
View file
open5gs_2.6.2.8.aed52.202304210026.tar.xz/src/upf/n4-handler.c -> open5gs_2.6.2.15.7580d.202304220026.tar.xz/src/upf/n4-handler.c
Changed
@@ -104,17 +104,24 @@ if (cause_value != OGS_PFCP_CAUSE_REQUEST_ACCEPTED) goto cleanup; + if (req->apn_dnn.presence) { + char apn_dnnOGS_MAX_DNN_LEN+1; + + ogs_assert(0 < ogs_fqdn_parse(apn_dnn, req->apn_dnn.data, + ogs_min(req->apn_dnn.len, OGS_MAX_DNN_LEN))); + + if (sess->apn_dnn) + ogs_free(sess->apn_dnn); + sess->apn_dnn = ogs_strdup(apn_dnn); + ogs_assert(sess->apn_dnn); + } + for (i = 0; i < OGS_MAX_NUM_OF_QER; i++) { if (ogs_pfcp_handle_create_qer(&sess->pfcp, &req->create_qeri, &cause_value, &offending_ie_value) == NULL) break; - if (req->apn_dnn.presence == 1) { - upf_metrics_inst_by_dnn_add(req->apn_dnn.data, - UPF_METR_GAUGE_UPF_QOSFLOWS, 1); - } else { - upf_metrics_inst_by_dnn_add(NULL, - UPF_METR_GAUGE_UPF_QOSFLOWS, 1); - } + upf_metrics_inst_by_dnn_add(sess->apn_dnn, + UPF_METR_GAUGE_UPF_QOSFLOWS, 1); } if (cause_value != OGS_PFCP_CAUSE_REQUEST_ACCEPTED) goto cleanup; @@ -329,7 +336,7 @@ if (ogs_pfcp_handle_create_qer(&sess->pfcp, &req->create_qeri, &cause_value, &offending_ie_value) == NULL) break; - upf_metrics_inst_by_dnn_add(NULL, + upf_metrics_inst_by_dnn_add(sess->apn_dnn, UPF_METR_GAUGE_UPF_QOSFLOWS, 1); } if (cause_value != OGS_PFCP_CAUSE_REQUEST_ACCEPTED) @@ -347,7 +354,7 @@ if (ogs_pfcp_handle_remove_qer(&sess->pfcp, &req->remove_qeri, &cause_value, &offending_ie_value) == false) break; - upf_metrics_inst_by_dnn_add(NULL, + upf_metrics_inst_by_dnn_add(sess->apn_dnn, UPF_METR_GAUGE_UPF_QOSFLOWS, -1); } if (cause_value != OGS_PFCP_CAUSE_REQUEST_ACCEPTED) @@ -426,10 +433,9 @@ ogs_list_for_each(&sess->pfcp.pdr_list, pdr) { ogs_list_for_each(&sess->pfcp.qer_list, qer) { - upf_metrics_inst_by_dnn_add(NULL, + upf_metrics_inst_by_dnn_add(sess->apn_dnn, UPF_METR_GAUGE_UPF_QOSFLOWS, -1); } - break; } upf_sess_remove(sess); }
View file
open5gs_2.6.2.8.aed52.202304210026.tar.xz/tests/af/context.c -> open5gs_2.6.2.15.7580d.202304220026.tar.xz/tests/af/context.c
Changed
@@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2022 by Sukchan Lee <acetcom@gmail.com> + * Copyright (C) 2019-2023 by Sukchan Lee <acetcom@gmail.com> * * This file is part of Open5GS. * @@ -267,17 +267,21 @@ } static ogs_sbi_client_t *find_client_by_fqdn( - OpenAPI_uri_scheme_e scheme, char *fqdn, int port) + OpenAPI_uri_scheme_e scheme, char *fqdn) { int rv; ogs_sockaddr_t *addr = NULL; ogs_sbi_client_t *client = NULL; - ogs_assert(scheme); + ogs_assert(scheme == OpenAPI_uri_scheme_https || + scheme == OpenAPI_uri_scheme_http); ogs_assert(fqdn); - rv = ogs_getaddrinfo(&addr, AF_UNSPEC, fqdn, - port ? port : ogs_sbi_self()->sbi_port, 0); + rv = ogs_getaddrinfo( + &addr, AF_UNSPEC, fqdn, + scheme == OpenAPI_uri_scheme_https ? + OGS_SBI_HTTPS_PORT : OGS_SBI_HTTP_PORT, + 0); if (rv != OGS_OK) { ogs_error("Invalid NFProfile.fqdn"); return NULL; @@ -306,7 +310,7 @@ OpenAPI_uri_scheme_https : OpenAPI_uri_scheme_http; if (sess->pcf.fqdn && strlen(sess->pcf.fqdn)) - client = find_client_by_fqdn(scheme, sess->pcf.fqdn, 0); + client = find_client_by_fqdn(scheme, sess->pcf.fqdn); if (!client) { /* At this point, CLIENT selection method is very simple. */
View file
open5gs_2.6.2.8.aed52.202304210026.tar.xz/tests/af/context.h -> open5gs_2.6.2.15.7580d.202304220026.tar.xz/tests/af/context.h
Changed
@@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2022 by Sukchan Lee <acetcom@gmail.com> + * Copyright (C) 2019-2023 by Sukchan Lee <acetcom@gmail.com> * * This file is part of Open5GS. * @@ -72,6 +72,7 @@ struct { ogs_sockaddr_t *addr; ogs_sockaddr_t *addr6; + bool is_port; int port; } ipOGS_SBI_MAX_NUM_OF_IP_ADDRESS;
View file
open5gs_2.6.2.8.aed52.202304210026.tar.xz/tests/af/nbsf-handler.c -> open5gs_2.6.2.15.7580d.202304220026.tar.xz/tests/af/nbsf-handler.c
Changed
@@ -1,5 +1,5 @@ /* - * Copyright (C) 2019,2020 by Sukchan Lee <acetcom@gmail.com> + * Copyright (C) 2019-2023 by Sukchan Lee <acetcom@gmail.com> * * This file is part of Open5GS. * @@ -67,21 +67,10 @@ if (!IpEndPoint) continue; if (sess->pcf.num_of_ip < OGS_SBI_MAX_NUM_OF_IP_ADDRESS) { - if (!IpEndPoint->is_port) { - if (ogs_sbi_default_uri_scheme() == - OpenAPI_uri_scheme_http) - port = OGS_SBI_HTTP_PORT; - else if (ogs_sbi_default_uri_scheme() == - OpenAPI_uri_scheme_https) - port = OGS_SBI_HTTPS_PORT; - else { - ogs_fatal("Invalid scheme %d", - ogs_sbi_default_uri_scheme()); - ogs_assert_if_reached(); - } - } else { + if (!IpEndPoint->is_port) + port = ogs_sbi_client_default_port(); + else port = IpEndPoint->port; - } if (IpEndPoint->ipv4_address) { rv = ogs_getaddrinfo(&addr, AF_UNSPEC, @@ -95,6 +84,7 @@ } if (addr || addr6) { + sess->pcf.ipsess->pcf.num_of_ip.is_port = IpEndPoint->is_port; sess->pcf.ipsess->pcf.num_of_ip.port = port; sess->pcf.ipsess->pcf.num_of_ip.addr = addr; sess->pcf.ipsess->pcf.num_of_ip.addr6 = addr6;
View file
open5gs_2.6.2.8.aed52.202304210026.tar.xz/tests/attach/guti-test.c -> open5gs_2.6.2.15.7580d.202304220026.tar.xz/tests/attach/guti-test.c
Changed
@@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com> + * Copyright (C) 2019-2023 by Sukchan Lee <acetcom@gmail.com> * * This file is part of Open5GS. * @@ -228,7 +228,7 @@ memset(&sess->pdn_connectivity_param, 0, sizeof(sess->pdn_connectivity_param)); sess->pdn_connectivity_param.eit = 1; - sess->pdn_connectivity_param.pco = 1; + sess->pdn_connectivity_param.epco = 1; sess->pdn_connectivity_param.request_type = OGS_NAS_EPS_REQUEST_TYPE_INITIAL; esmbuf = testesm_build_pdn_connectivity_request(sess, false);
View file
open5gs_2.6.2.8.aed52.202304210026.tar.xz/tests/attach/simple-test.c -> open5gs_2.6.2.15.7580d.202304220026.tar.xz/tests/attach/simple-test.c
Changed
@@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com> + * Copyright (C) 2019-2023 by Sukchan Lee <acetcom@gmail.com> * * This file is part of Open5GS. * @@ -149,7 +149,7 @@ tests1ap_recv(test_ue, recvbuf); /* Send ESM Information Response */ - sess->esm_information_param.pco = 1; + sess->esm_information_param.epco = 1; esmbuf = testesm_build_esm_information_response(sess); ABTS_PTR_NOTNULL(tc, esmbuf); sendbuf = test_s1ap_build_uplink_nas_transport(test_ue, esmbuf);
View file
open5gs_2.6.2.8.aed52.202304210026.tar.xz/tests/common/context.h -> open5gs_2.6.2.15.7580d.202304220026.tar.xz/tests/common/context.h
Changed
@@ -257,10 +257,11 @@ typedef struct test_pdn_connectivity_param_s { union { struct { - ED6(uint8_t eit:1;, + ED7(uint8_t eit:1;, uint8_t eit_no_required:1;, uint8_t apn:1;, uint8_t pco:1;, + uint8_t epco:1;, uint8_t spare:1;, uint8_t request_type:3;) }; @@ -272,7 +273,7 @@ union { struct { ED8(uint8_t pco:1;, - uint8_t spare1:1;, + uint8_t epco:1;, uint8_t spare2:1;, uint8_t spare3:1;, uint8_t spare4:1;,
View file
open5gs_2.6.2.8.aed52.202304210026.tar.xz/tests/common/esm-build.c -> open5gs_2.6.2.15.7580d.202304220026.tar.xz/tests/common/esm-build.c
Changed
@@ -1,5 +1,5 @@ /* - * Copyright (C) 2019,2020 by Sukchan Lee <acetcom@gmail.com> + * Copyright (C) 2019-2023 by Sukchan Lee <acetcom@gmail.com> * * This file is part of Open5GS. * @@ -34,6 +34,8 @@ &pdn_connectivity_request->esm_information_transfer_flag; ogs_nas_protocol_configuration_options_t *protocol_configuration_options = &pdn_connectivity_request->protocol_configuration_options; + ogs_nas_extended_protocol_configuration_options_t *extended_protocol_configuration_options = + &pdn_connectivity_request->extended_protocol_configuration_options; #if 0 uint8_t ue_pco29 = "\x80\x80\x21\x10\x01\x01\x00\x10\x81\x06\x00\x00\x00\x00" @@ -87,12 +89,25 @@ pdn_connectivity_request->presencemask |= OGS_NAS_EPS_PDN_CONNECTIVITY_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; protocol_configuration_options->length = sizeof(ue_pco); memcpy(protocol_configuration_options->buffer, ue_pco, sizeof(ue_pco)); + } else if (sess->pdn_connectivity_param.epco) { + pdn_connectivity_request->presencemask |= OGS_NAS_EPS_PDN_CONNECTIVITY_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; + extended_protocol_configuration_options->length = sizeof(ue_pco); + extended_protocol_configuration_options->buffer = + ogs_calloc(sizeof(uint8_t), extended_protocol_configuration_options->length); + ogs_assert(extended_protocol_configuration_options->buffer); + memcpy(extended_protocol_configuration_options->buffer, ue_pco, sizeof(ue_pco)); } if (integrity_protected) - return test_nas_eps_security_encode(test_ue, &message); + pkbuf = test_nas_eps_security_encode(test_ue, &message); else - return ogs_nas_eps_plain_encode(&message); + pkbuf = ogs_nas_eps_plain_encode(&message); + ogs_assert(pkbuf); + + if (extended_protocol_configuration_options->buffer) + ogs_free(extended_protocol_configuration_options->buffer); + + return pkbuf; } ogs_pkbuf_t *testesm_build_pdn_disconnect_request(test_sess_t *sess) @@ -139,6 +154,8 @@ &esm_information_response->access_point_name; ogs_nas_protocol_configuration_options_t *protocol_configuration_options = &esm_information_response->protocol_configuration_options; + ogs_nas_extended_protocol_configuration_options_t *extended_protocol_configuration_options = + &esm_information_response->extended_protocol_configuration_options; #if 0 uint8_t ue_pco29 = @@ -191,9 +208,22 @@ esm_information_response->presencemask |= OGS_NAS_EPS_ESM_INFORMATION_RESPONSE_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; protocol_configuration_options->length = sizeof(ue_pco); memcpy(protocol_configuration_options->buffer, ue_pco, sizeof(ue_pco)); + } else if (sess->esm_information_param.epco) { + esm_information_response->presencemask |= OGS_NAS_EPS_ESM_INFORMATION_RESPONSE_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; + extended_protocol_configuration_options->length = sizeof(ue_pco); + extended_protocol_configuration_options->buffer = + ogs_calloc(sizeof(uint8_t), extended_protocol_configuration_options->length); + ogs_assert(extended_protocol_configuration_options->buffer); + memcpy(extended_protocol_configuration_options->buffer, ue_pco, sizeof(ue_pco)); } - return test_nas_eps_security_encode(test_ue, &message); + pkbuf = test_nas_eps_security_encode(test_ue, &message); + ogs_assert(pkbuf); + + if (extended_protocol_configuration_options->buffer) + ogs_free(extended_protocol_configuration_options->buffer); + + return pkbuf; } ogs_pkbuf_t *testesm_build_activate_default_eps_bearer_context_accept(
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
.