Projects
osmocom:nightly
open5gs
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 213
View file
open5gs_2.4.9.252.11aac.202301240007.dsc -> open5gs_2.4.9.256.596a2.202301250006.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.4.9.252.11aac.202301240007 +Version: 2.4.9.256.596a2.202301250006 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: - b3ccb45e4376c481789cb0ea1f186330c5e527d4 13613416 open5gs_2.4.9.252.11aac.202301240007.tar.xz + c666c5584e98172197f5a7e571ec8947b779a303 13613944 open5gs_2.4.9.256.596a2.202301250006.tar.xz Checksums-Sha256: - c37e0c56068a6b1abb1b77c486587d3a7f113267c4ae8b9437255e16e2abf5ac 13613416 open5gs_2.4.9.252.11aac.202301240007.tar.xz + 82ad9a47e5b955135d9b72c37a89e95413e14b1c4cf5187738f635c05ea07390 13613944 open5gs_2.4.9.256.596a2.202301250006.tar.xz Files: - 41d885560b5facd7975420582f346aab 13613416 open5gs_2.4.9.252.11aac.202301240007.tar.xz + 2b1a6e5cd3a0c26d6ce25778a592e6d8 13613944 open5gs_2.4.9.256.596a2.202301250006.tar.xz
View file
open5gs_2.4.9.252.11aac.202301240007.tar.xz/.tarball-version -> open5gs_2.4.9.256.596a2.202301250006.tar.xz/.tarball-version
Changed
@@ -1 +1 @@ -2.4.9.252-11aac.202301240007 +2.4.9.256-596a2.202301250006
View file
open5gs_2.4.9.252.11aac.202301240007.tar.xz/debian/changelog -> open5gs_2.4.9.256.596a2.202301250006.tar.xz/debian/changelog
Changed
@@ -1,8 +1,8 @@ -open5gs (2.4.9.252.11aac.202301240007) unstable; urgency=medium +open5gs (2.4.9.256.596a2.202301250006) unstable; urgency=medium * Automatically generated changelog entry for building the Osmocom nightly feed - -- Osmocom OBS scripts <info@osmocom.org> Tue, 24 Jan 2023 00:09:38 +0000 + -- Osmocom OBS scripts <info@osmocom.org> Wed, 25 Jan 2023 00:08:51 +0000 open5gs (2.5.6) unstable; urgency=medium
View file
open5gs_2.4.9.252.11aac.202301240007.tar.xz/lib/app/ogs-context.c -> open5gs_2.4.9.256.596a2.202301250006.tar.xz/lib/app/ogs-context.c
Changed
@@ -425,10 +425,14 @@ const char *v = ogs_yaml_iter_value(&pool_iter); if (v) self.pool.defconfig.cluster_2048_pool = atoi(v); - } else if (!strcmp(pool_key, "16384")) { + } else if (!strcmp(pool_key, "8192")) { const char *v = ogs_yaml_iter_value(&pool_iter); if (v) - self.pool.defconfig.cluster_16384_pool = atoi(v); + self.pool.defconfig.cluster_8192_pool = atoi(v); + } else if (!strcmp(pool_key, "32768")) { + const char *v = ogs_yaml_iter_value(&pool_iter); + if (v) + self.pool.defconfig.cluster_32768_pool = atoi(v); } else if (!strcmp(pool_key, "big")) { const char *v = ogs_yaml_iter_value(&pool_iter); if (v)
View file
open5gs_2.4.9.252.11aac.202301240007.tar.xz/lib/core/ogs-macros.h -> open5gs_2.4.9.256.596a2.202301250006.tar.xz/lib/core/ogs-macros.h
Changed
@@ -206,6 +206,10 @@ #define OGS_MAX_FILEPATH_LEN 256 #define OGS_MAX_IFNAME_LEN 32 +#define OGS_MAX_SDU_LEN 32768 /* Should Heap */ +#define OGS_HUGE_LEN 8192 /* Can Stack */ +#define OGS_MAX_PKT_LEN 2048 + #define OGS_FILE_LINE __FILE__ ":" OGS_STRINGIFY(__LINE__) #define ogs_uint64_to_uint32(x) ((x >= 0xffffffffUL) ? 0xffffffffU : x)
View file
open5gs_2.4.9.252.11aac.202301240007.tar.xz/lib/core/ogs-pkbuf.c -> open5gs_2.4.9.256.596a2.202301250006.tar.xz/lib/core/ogs-pkbuf.c
Changed
@@ -28,7 +28,8 @@ #define OGS_CLUSTER_512_SIZE 512 #define OGS_CLUSTER_1024_SIZE 1024 #define OGS_CLUSTER_2048_SIZE 2048 -#define OGS_CLUSTER_16384_SIZE 16384 +#define OGS_CLUSTER_8192_SIZE 8192 +#define OGS_CLUSTER_32768_SIZE 32768 /* * @@ -48,7 +49,8 @@ typedef uint8_t ogs_cluster_512_tOGS_CLUSTER_512_SIZE; typedef uint8_t ogs_cluster_1024_tOGS_CLUSTER_1024_SIZE; typedef uint8_t ogs_cluster_2048_tOGS_CLUSTER_2048_SIZE; -typedef uint8_t ogs_cluster_16384_tOGS_CLUSTER_16384_SIZE; +typedef uint8_t ogs_cluster_8192_tOGS_CLUSTER_8192_SIZE; +typedef uint8_t ogs_cluster_32768_tOGS_CLUSTER_32768_SIZE; typedef uint8_t ogs_cluster_big_tOGS_CLUSTER_BIG_SIZE; OGS_STATIC_ASSERT(sizeof(ogs_cluster_128_t) % sizeof(void *) == 0); @@ -56,7 +58,8 @@ OGS_STATIC_ASSERT(sizeof(ogs_cluster_512_t) % sizeof(void *) == 0); OGS_STATIC_ASSERT(sizeof(ogs_cluster_1024_t) % sizeof(void *) == 0); OGS_STATIC_ASSERT(sizeof(ogs_cluster_2048_t) % sizeof(void *) == 0); -OGS_STATIC_ASSERT(sizeof(ogs_cluster_16384_t) % sizeof(void *) == 0); +OGS_STATIC_ASSERT(sizeof(ogs_cluster_8192_t) % sizeof(void *) == 0); +OGS_STATIC_ASSERT(sizeof(ogs_cluster_32768_t) % sizeof(void *) == 0); OGS_STATIC_ASSERT(sizeof(ogs_cluster_big_t) % sizeof(void *) == 0); typedef struct ogs_pkbuf_pool_s { @@ -68,7 +71,8 @@ OGS_POOL(cluster_512, ogs_cluster_512_t); OGS_POOL(cluster_1024, ogs_cluster_1024_t); OGS_POOL(cluster_2048, ogs_cluster_2048_t); - OGS_POOL(cluster_16384, ogs_cluster_16384_t); + OGS_POOL(cluster_8192, ogs_cluster_8192_t); + OGS_POOL(cluster_32768, ogs_cluster_32768_t); OGS_POOL(cluster_big, ogs_cluster_big_t); ogs_thread_mutex_t mutex; @@ -116,7 +120,8 @@ config->cluster_512_pool = 4096; config->cluster_1024_pool = 2048; config->cluster_2048_pool = 1024; - config->cluster_16384_pool = 512; + config->cluster_8192_pool = 256; + config->cluster_32768_pool = 64; config->cluster_big_pool = 8; #endif } @@ -151,8 +156,8 @@ tmp = config->cluster_128_pool + config->cluster_256_pool + config->cluster_512_pool + config->cluster_1024_pool + - config->cluster_2048_pool + config->cluster_16384_pool + - config->cluster_big_pool; + config->cluster_2048_pool + config->cluster_8192_pool + + config->cluster_32768_pool + config->cluster_big_pool; ogs_pool_init(&pool->pkbuf, tmp); ogs_pool_init(&pool->cluster, tmp); @@ -162,7 +167,8 @@ ogs_pool_init(&pool->cluster_512, config->cluster_512_pool); ogs_pool_init(&pool->cluster_1024, config->cluster_1024_pool); ogs_pool_init(&pool->cluster_2048, config->cluster_2048_pool); - ogs_pool_init(&pool->cluster_16384, config->cluster_16384_pool); + ogs_pool_init(&pool->cluster_8192, config->cluster_8192_pool); + ogs_pool_init(&pool->cluster_32768, config->cluster_32768_pool); ogs_pool_init(&pool->cluster_big, config->cluster_big_pool); #endif @@ -200,7 +206,8 @@ ogs_pool_final(&pool->cluster_512); ogs_pool_final(&pool->cluster_1024); ogs_pool_final(&pool->cluster_2048); - ogs_pool_final(&pool->cluster_16384); + ogs_pool_final(&pool->cluster_8192); + ogs_pool_final(&pool->cluster_32768); ogs_pool_final(&pool->cluster_big); ogs_thread_mutex_destroy(&pool->mutex); @@ -405,13 +412,20 @@ return NULL; } cluster->size = OGS_CLUSTER_2048_SIZE; - } else if (size <= OGS_CLUSTER_16384_SIZE) { - ogs_pool_alloc(&pool->cluster_16384, (ogs_cluster_16384_t**)&buffer); + } else if (size <= OGS_CLUSTER_8192_SIZE) { + ogs_pool_alloc(&pool->cluster_8192, (ogs_cluster_8192_t**)&buffer); if (!buffer) { ogs_error("ogs_pool_alloc() failed"); return NULL; } - cluster->size = OGS_CLUSTER_16384_SIZE; + cluster->size = OGS_CLUSTER_8192_SIZE; + } else if (size <= OGS_CLUSTER_32768_SIZE) { + ogs_pool_alloc(&pool->cluster_32768, (ogs_cluster_32768_t**)&buffer); + if (!buffer) { + ogs_error("ogs_pool_alloc() failed"); + return NULL; + } + cluster->size = OGS_CLUSTER_32768_SIZE; } else if (size <= OGS_CLUSTER_BIG_SIZE) { ogs_pool_alloc(&pool->cluster_big, (ogs_cluster_big_t**)&buffer); if (!buffer) { @@ -452,9 +466,13 @@ ogs_pool_free( &pool->cluster_2048, (ogs_cluster_2048_t*)cluster->buffer); break; - case OGS_CLUSTER_16384_SIZE: + case OGS_CLUSTER_8192_SIZE: + ogs_pool_free( + &pool->cluster_8192, (ogs_cluster_8192_t*)cluster->buffer); + break; + case OGS_CLUSTER_32768_SIZE: ogs_pool_free( - &pool->cluster_16384, (ogs_cluster_16384_t*)cluster->buffer); + &pool->cluster_32768, (ogs_cluster_32768_t*)cluster->buffer); break; case OGS_CLUSTER_BIG_SIZE: ogs_pool_free(&pool->cluster_big, (ogs_cluster_big_t*)cluster->buffer);
View file
open5gs_2.4.9.252.11aac.202301240007.tar.xz/lib/core/ogs-pkbuf.h -> open5gs_2.4.9.256.596a2.202301250006.tar.xz/lib/core/ogs-pkbuf.h
Changed
@@ -68,7 +68,8 @@ int cluster_512_pool; int cluster_1024_pool; int cluster_2048_pool; - int cluster_16384_pool; + int cluster_8192_pool; + int cluster_32768_pool; int cluster_big_pool; } ogs_pkbuf_config_t;
View file
open5gs_2.4.9.252.11aac.202301240007.tar.xz/lib/core/ogs-strings.h -> open5gs_2.4.9.256.596a2.202301250006.tar.xz/lib/core/ogs-strings.h
Changed
@@ -54,8 +54,6 @@ extern "C" { #endif -#define OGS_HUGE_LEN 16384 - #if defined(_WIN32) #define ogs_strtok_r strtok_s #define ogs_strcasecmp _stricmp
View file
open5gs_2.4.9.252.11aac.202301240007.tar.xz/lib/diameter/common/init.c -> open5gs_2.4.9.256.596a2.202301250006.tar.xz/lib/diameter/common/init.c
Changed
@@ -98,15 +98,19 @@ static void diam_log_func(int printlevel, const char *format, va_list ap) { - char bufferOGS_HUGE_LEN*2; + char *buffer = NULL; int ret = 0; + buffer = ogs_calloc(1, OGS_MAX_SDU_LEN); + ogs_assert(buffer); + #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wformat-nonliteral" - ret = ogs_vsnprintf(buffer, OGS_HUGE_LEN*2, format, ap); + ret = ogs_vsnprintf(buffer, OGS_MAX_SDU_LEN, format, ap); #pragma GCC diagnostic pop - if (ret < 0 || ret > OGS_HUGE_LEN*2) { + if (ret < 0 || ret > OGS_MAX_SDU_LEN) { ogs_error("vsnprintf() failedret=%d", ret); + ogs_free(buffer); return; } @@ -142,4 +146,6 @@ diam_log_printf(OGS_LOG_ERROR, "%d %s\n", printlevel, buffer); break; } + + ogs_free(buffer); }
View file
open5gs_2.4.9.252.11aac.202301240007.tar.xz/lib/pfcp/build.c -> open5gs_2.4.9.256.596a2.202301250006.tar.xz/lib/pfcp/build.c
Changed
@@ -21,50 +21,78 @@ ogs_pkbuf_t *ogs_pfcp_build_heartbeat_request(uint8_t type) { - ogs_pfcp_message_t pfcp_message; + ogs_pfcp_message_t *pfcp_message = NULL; ogs_pfcp_heartbeat_request_t *req = NULL; + ogs_pkbuf_t *pkbuf = NULL; ogs_debug("Heartbeat Request"); - req = &pfcp_message.pfcp_heartbeat_request; - memset(&pfcp_message, 0, sizeof(ogs_pfcp_message_t)); + pfcp_message = ogs_calloc(1, sizeof(*pfcp_message)); + if (!pfcp_message) { + ogs_error("ogs_calloc() failed"); + return NULL; + } + + req = &pfcp_message->pfcp_heartbeat_request; req->recovery_time_stamp.presence = 1; req->recovery_time_stamp.u32 = ogs_pfcp_self()->pfcp_started; - pfcp_message.h.type = type; - return ogs_pfcp_build_msg(&pfcp_message); + pfcp_message->h.type = type; + pkbuf = ogs_pfcp_build_msg(pfcp_message); + ogs_expect(pkbuf); + + ogs_free(pfcp_message); + + return pkbuf; } ogs_pkbuf_t *ogs_pfcp_build_heartbeat_response(uint8_t type) { - ogs_pfcp_message_t pfcp_message; + ogs_pfcp_message_t *pfcp_message = NULL; ogs_pfcp_heartbeat_response_t *rsp = NULL; + ogs_pkbuf_t *pkbuf = NULL; ogs_debug("Heartbeat Response"); - rsp = &pfcp_message.pfcp_heartbeat_response; - memset(&pfcp_message, 0, sizeof(ogs_pfcp_message_t)); + pfcp_message = ogs_calloc(1, sizeof(*pfcp_message)); + if (!pfcp_message) { + ogs_error("ogs_calloc() failed"); + return NULL; + } + + rsp = &pfcp_message->pfcp_heartbeat_response; rsp->recovery_time_stamp.presence = 1; rsp->recovery_time_stamp.u32 = ogs_pfcp_self()->pfcp_started; - pfcp_message.h.type = type; - return ogs_pfcp_build_msg(&pfcp_message); + pfcp_message->h.type = type; + pkbuf = ogs_pfcp_build_msg(pfcp_message); + ogs_expect(pkbuf); + + ogs_free(pfcp_message); + + return pkbuf; } ogs_pkbuf_t *ogs_pfcp_cp_build_association_setup_request(uint8_t type) { - ogs_pfcp_message_t pfcp_message; + ogs_pfcp_message_t *pfcp_message = NULL; ogs_pfcp_association_setup_request_t *req = NULL; + ogs_pkbuf_t *pkbuf = NULL; ogs_pfcp_node_id_t node_id; int node_id_len = 0, rv; ogs_debug("Association Setup Request"); - req = &pfcp_message.pfcp_association_setup_request; - memset(&pfcp_message, 0, sizeof(ogs_pfcp_message_t)); + pfcp_message = ogs_calloc(1, sizeof(*pfcp_message)); + if (!pfcp_message) { + ogs_error("ogs_calloc() failed"); + return NULL; + } + + req = &pfcp_message->pfcp_association_setup_request; rv = ogs_pfcp_sockaddr_to_node_id( ogs_pfcp_self()->pfcp_addr, ogs_pfcp_self()->pfcp_addr6, @@ -72,6 +100,7 @@ &node_id, &node_id_len); if (rv != OGS_OK) { ogs_error("ogs_pfcp_sockaddr_to_node_id() failed"); + ogs_free(pfcp_message); return NULL; } req->node_id.presence = 1; @@ -84,23 +113,34 @@ req->cp_function_features.presence = 1; req->cp_function_features.u8 = ogs_pfcp_self()->cp_function_features.octet5; - pfcp_message.h.type = type; - return ogs_pfcp_build_msg(&pfcp_message); + pfcp_message->h.type = type; + pkbuf = ogs_pfcp_build_msg(pfcp_message); + ogs_expect(pkbuf); + + ogs_free(pfcp_message); + + return pkbuf; } ogs_pkbuf_t *ogs_pfcp_cp_build_association_setup_response(uint8_t type, uint8_t cause) { - ogs_pfcp_message_t pfcp_message; + ogs_pfcp_message_t *pfcp_message = NULL; ogs_pfcp_association_setup_response_t *rsp = NULL; + ogs_pkbuf_t *pkbuf = NULL; ogs_pfcp_node_id_t node_id; int node_id_len = 0, rv; ogs_debug("Association Setup Response"); - rsp = &pfcp_message.pfcp_association_setup_response; - memset(&pfcp_message, 0, sizeof(ogs_pfcp_message_t)); + pfcp_message = ogs_calloc(1, sizeof(*pfcp_message)); + if (!pfcp_message) { + ogs_error("ogs_calloc() failed"); + return NULL; + } + + rsp = &pfcp_message->pfcp_association_setup_response; rv = ogs_pfcp_sockaddr_to_node_id( ogs_pfcp_self()->pfcp_addr, ogs_pfcp_self()->pfcp_addr6, @@ -108,6 +148,7 @@ &node_id, &node_id_len); if (rv != OGS_OK) { ogs_error("ogs_pfcp_sockaddr_to_node_id() failed"); + ogs_free(pfcp_message); return NULL; } rsp->node_id.presence = 1; @@ -123,14 +164,20 @@ rsp->cp_function_features.presence = 1; rsp->cp_function_features.u8 = ogs_pfcp_self()->cp_function_features.octet5; - pfcp_message.h.type = type; - return ogs_pfcp_build_msg(&pfcp_message); + pfcp_message->h.type = type; + pkbuf = ogs_pfcp_build_msg(pfcp_message); + ogs_expect(pkbuf); + + ogs_free(pfcp_message); + + return pkbuf; } ogs_pkbuf_t *ogs_pfcp_up_build_association_setup_request(uint8_t type) { - ogs_pfcp_message_t pfcp_message; + ogs_pfcp_message_t *pfcp_message = NULL; ogs_pfcp_association_setup_request_t *req = NULL; + ogs_pkbuf_t *pkbuf = NULL; ogs_pfcp_node_id_t node_id; int node_id_len = 0; @@ -142,8 +189,13 @@ ogs_debug("Association Setup Request"); - req = &pfcp_message.pfcp_association_setup_request; - memset(&pfcp_message, 0, sizeof(ogs_pfcp_message_t)); + pfcp_message = ogs_calloc(1, sizeof(*pfcp_message)); + if (!pfcp_message) { + ogs_error("ogs_calloc() failed"); + return NULL; + } + + req = &pfcp_message->pfcp_association_setup_request; rv = ogs_pfcp_sockaddr_to_node_id( ogs_pfcp_self()->pfcp_addr, ogs_pfcp_self()->pfcp_addr6, @@ -151,6 +203,7 @@ &node_id, &node_id_len); if (rv != OGS_OK) { ogs_error("ogs_pfcp_sockaddr_to_node_id() failed"); + ogs_free(pfcp_message); return NULL; } req->node_id.presence = 1; @@ -181,15 +234,21 @@ } }
View file
open5gs_2.4.9.252.11aac.202301240007.tar.xz/lib/proto/types.c -> open5gs_2.4.9.256.596a2.202301250006.tar.xz/lib/proto/types.c
Changed
@@ -464,7 +464,7 @@ ogs_error("No IP"); return OGS_ERROR; } - if (!addr && !addr) { + if (!addr && !addr6) { ogs_error("No Address"); return OGS_ERROR; }
View file
open5gs_2.4.9.252.11aac.202301240007.tar.xz/lib/proto/types.h -> open5gs_2.4.9.256.596a2.202301250006.tar.xz/lib/proto/types.h
Changed
@@ -52,8 +52,6 @@ #define OGS_MAX_NUM_OF_GTPU_RESOURCE 4 #define OGS_MAX_NUM_OF_FRAMED_ROUTES_IN_PDI 8 -#define OGS_MAX_SDU_LEN OGS_HUGE_LEN -#define OGS_MAX_PKT_LEN 2048 #define OGS_PLMN_ID_LEN 3 #define OGS_MAX_PLMN_ID_BCD_LEN 6
View file
open5gs_2.4.9.252.11aac.202301240007.tar.xz/lib/sbi/client.c -> open5gs_2.4.9.256.596a2.202301250006.tar.xz/lib/sbi/client.c
Changed
@@ -382,7 +382,7 @@ request->h.uri = uri; } - curl_easy_setopt(conn->easy, CURLOPT_BUFFERSIZE, OGS_MAX_SDU_LEN*2); + curl_easy_setopt(conn->easy, CURLOPT_BUFFERSIZE, OGS_MAX_SDU_LEN); curl_easy_setopt(conn->easy, CURLOPT_SSL_VERIFYPEER, 0); curl_easy_setopt(conn->easy, CURLOPT_SSL_VERIFYHOST, 0);
View file
open5gs_2.4.9.252.11aac.202301240007.tar.xz/lib/sbi/conv.c -> open5gs_2.4.9.256.596a2.202301250006.tar.xz/lib/sbi/conv.c
Changed
@@ -540,6 +540,11 @@ unit = strrchr(str, ' '); bitrate = atoll(str); + if (!unit) { + ogs_error("No Unit %s", str); + return bitrate; + } + SWITCH(unit+1) CASE("Kbps") return bitrate * 1024;
View file
open5gs_2.4.9.252.11aac.202301240007.tar.xz/lib/sbi/message.c -> open5gs_2.4.9.256.596a2.202301250006.tar.xz/lib/sbi/message.c
Changed
@@ -2239,7 +2239,7 @@ } else { offset = data->partdata->num_of_part.content_length; if ((data->partdata->num_of_part.content_length + length) > - OGS_HUGE_LEN) { + OGS_MAX_SDU_LEN) { ogs_error("Overflow length %d:%d", (int)data->partdata->num_of_part.content_length, (int)length); @@ -2414,12 +2414,12 @@ strcpy(boundary, "=-"); ogs_base64_encode_binary(boundary + 2, digest, 16); - p = http->content = ogs_calloc(1, OGS_HUGE_LEN); + p = http->content = ogs_calloc(1, OGS_MAX_SDU_LEN); if (!p) { ogs_error("ogs_calloc() failed"); return false; } - last = p + OGS_HUGE_LEN; + last = p + OGS_MAX_SDU_LEN; /* First boundary */ p = ogs_slprintf(p, last, "--%s\r\n", boundary);
View file
open5gs_2.4.9.252.11aac.202301240007.tar.xz/lib/sbi/mhd-server.c -> open5gs_2.4.9.256.596a2.202301250006.tar.xz/lib/sbi/mhd-server.c
Changed
@@ -543,7 +543,7 @@ } else { offset = request->http.content_length; if ((request->http.content_length + - *upload_data_size) > OGS_HUGE_LEN) { + *upload_data_size) > OGS_MAX_SDU_LEN) { ogs_error("Overflow : Content-Length%d, upload_data_size%d", (int)request->http.content_length, (int)*upload_data_size);
View file
open5gs_2.4.9.252.11aac.202301240007.tar.xz/src/pcf/npcf-handler.c -> open5gs_2.4.9.256.596a2.202301250006.tar.xz/src/pcf/npcf-handler.c
Changed
@@ -633,6 +633,13 @@ uint8_t qos_index = 0; ogs_media_component_t *media_component = &ims_data.media_componenti; + if (media_component->media_type == OpenAPI_media_type_NULL) { + strerror = ogs_msprintf("%s:%d Media-Type is Required", + pcf_ue->supi, sess->psi); + status = OGS_SBI_HTTP_STATUS_BAD_REQUEST; + goto cleanup; + } + switch(media_component->media_type) { case OpenAPI_media_type_AUDIO: qos_index = OGS_QOS_INDEX_1; @@ -644,9 +651,9 @@ qos_index = OGS_QOS_INDEX_5; break; default: - strerror = ogs_msprintf("%s:%d Not implemented : Media-Type:%d", + strerror = ogs_msprintf("%s:%d Unknown Media-Type %d", pcf_ue->supi, sess->psi, media_component->media_type); - status = OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR; + status = OGS_SBI_HTTP_STATUS_BAD_REQUEST; goto cleanup; } @@ -1046,6 +1053,13 @@ uint8_t qos_index = 0; ogs_media_component_t *media_component = &ims_data.media_componenti; + if (media_component->media_type == OpenAPI_media_type_NULL) { + strerror = ogs_msprintf("%s:%d Media-Type is Required", + pcf_ue->supi, sess->psi); + status = OGS_SBI_HTTP_STATUS_BAD_REQUEST; + goto cleanup; + } + switch(media_component->media_type) { case OpenAPI_media_type_AUDIO: qos_index = OGS_QOS_INDEX_1; @@ -1057,9 +1071,9 @@ qos_index = OGS_QOS_INDEX_5; break; default: - strerror = ogs_msprintf("%s:%d Not implemented : Media-Type:%d", + strerror = ogs_msprintf("%s:%d Unknown Media-Type %d", pcf_ue->supi, sess->psi, media_component->media_type); - status = OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR; + status = OGS_SBI_HTTP_STATUS_BAD_REQUEST; goto cleanup; }
View file
open5gs_2.4.9.252.11aac.202301240007.tar.xz/src/sgwc/sxa-build.c -> open5gs_2.4.9.256.596a2.202301250006.tar.xz/src/sgwc/sxa-build.c
Changed
@@ -22,7 +22,7 @@ ogs_pkbuf_t *sgwc_sxa_build_session_establishment_request( uint8_t type, sgwc_sess_t *sess) { - ogs_pfcp_message_t pfcp_message; + ogs_pfcp_message_t *pfcp_message = NULL; ogs_pfcp_session_establishment_request_t *req = NULL; ogs_pkbuf_t *pkbuf = NULL; @@ -39,8 +39,13 @@ ogs_debug("Session Establishment Request"); ogs_assert(sess); - req = &pfcp_message.pfcp_session_establishment_request; - memset(&pfcp_message, 0, sizeof(ogs_pfcp_message_t)); + pfcp_message = ogs_calloc(1, sizeof(*pfcp_message)); + if (!pfcp_message) { + ogs_error("ogs_calloc() failed"); + return NULL; + } + + req = &pfcp_message->pfcp_session_establishment_request; /* Node ID */ rv = ogs_pfcp_sockaddr_to_node_id( @@ -49,6 +54,7 @@ &node_id, &len); if (rv != OGS_OK) { ogs_error("ogs_pfcp_sockaddr_to_node_id() failed"); + ogs_free(pfcp_message); return NULL; } req->node_id.presence = 1; @@ -61,6 +67,7 @@ &f_seid, &len); if (rv != OGS_OK) { ogs_error("ogs_pfcp_sockaddr_to_f_seid() failed"); + ogs_free(pfcp_message); return NULL; } f_seid.seid = htobe64(sess->sgwc_sxa_seid); @@ -103,10 +110,12 @@ ogs_pfcp_build_create_bar(&req->create_bar, sess->pfcp.bar); } - pfcp_message.h.type = type; - pkbuf = ogs_pfcp_build_msg(&pfcp_message); + pfcp_message->h.type = type; + pkbuf = ogs_pfcp_build_msg(pfcp_message); + ogs_expect(pkbuf); ogs_pfcp_pdrbuf_clear(); + ogs_free(pfcp_message); return pkbuf; } @@ -114,7 +123,7 @@ ogs_pkbuf_t *sgwc_sxa_build_bearer_to_modify_list( uint8_t type, sgwc_sess_t *sess, ogs_pfcp_xact_t *xact) { - ogs_pfcp_message_t pfcp_message; + ogs_pfcp_message_t *pfcp_message = NULL; ogs_pfcp_session_modification_request_t *req = NULL; ogs_pkbuf_t *pkbuf = NULL; @@ -138,8 +147,13 @@ modify_flags = xact->modify_flags; ogs_assert(modify_flags); - req = &pfcp_message.pfcp_session_modification_request; - memset(&pfcp_message, 0, sizeof(ogs_pfcp_message_t)); + pfcp_message = ogs_calloc(1, sizeof(*pfcp_message)); + if (!pfcp_message) { + ogs_error("ogs_calloc() failed"); + return NULL; + } + + req = &pfcp_message->pfcp_session_modification_request; if (modify_flags & OGS_PFCP_MODIFY_CREATE) { ogs_pfcp_pdrbuf_init(); @@ -254,24 +268,39 @@ } } - pfcp_message.h.type = type; - pkbuf = ogs_pfcp_build_msg(&pfcp_message); + pfcp_message->h.type = type; + pkbuf = ogs_pfcp_build_msg(pfcp_message); + ogs_expect(pkbuf); if (modify_flags & OGS_PFCP_MODIFY_CREATE) { ogs_pfcp_pdrbuf_clear(); } + ogs_free(pfcp_message); + return pkbuf; } ogs_pkbuf_t *sgwc_sxa_build_session_deletion_request( uint8_t type, sgwc_sess_t *sess) { - ogs_pfcp_message_t pfcp_message; + ogs_pfcp_message_t *pfcp_message = NULL; + ogs_pkbuf_t *pkbuf = NULL; ogs_debug("Session Deletion Request"); ogs_assert(sess); - pfcp_message.h.type = type; - return ogs_pfcp_build_msg(&pfcp_message); + pfcp_message = ogs_calloc(1, sizeof(*pfcp_message)); + if (!pfcp_message) { + ogs_error("ogs_calloc() failed"); + return NULL; + } + + pfcp_message->h.type = type; + pkbuf = ogs_pfcp_build_msg(pfcp_message); + ogs_expect(pkbuf); + + ogs_free(pfcp_message); + + return pkbuf; }
View file
open5gs_2.4.9.252.11aac.202301240007.tar.xz/src/sgwu/sxa-build.c -> open5gs_2.4.9.256.596a2.202301250006.tar.xz/src/sgwu/sxa-build.c
Changed
@@ -22,7 +22,7 @@ ogs_pkbuf_t *sgwu_sxa_build_session_establishment_response(uint8_t type, sgwu_sess_t *sess, ogs_pfcp_pdr_t *created_pdr, int num_of_created_pdr) { - ogs_pfcp_message_t pfcp_message; + ogs_pfcp_message_t *pfcp_message = NULL; ogs_pfcp_session_establishment_response_t *rsp = NULL; ogs_pkbuf_t *pkbuf = NULL; @@ -34,8 +34,13 @@ ogs_debug("Session Establishment Response"); - rsp = &pfcp_message.pfcp_session_establishment_response; - memset(&pfcp_message, 0, sizeof(ogs_pfcp_message_t)); + pfcp_message = ogs_calloc(1, sizeof(*pfcp_message)); + if (!pfcp_message) { + ogs_error("ogs_calloc() failed"); + return NULL; + } + + rsp = &pfcp_message->pfcp_session_establishment_response; /* Node ID */ rv = ogs_pfcp_sockaddr_to_node_id( @@ -44,6 +49,7 @@ &node_id, &len); if (rv != OGS_OK) { ogs_error("ogs_pfcp_sockaddr_to_node_id() failed"); + ogs_free(pfcp_message); return NULL; } rsp->node_id.presence = 1; @@ -60,6 +66,7 @@ &f_seid, &len); if (rv != OGS_OK) { ogs_error("ogs_pfcp_sockaddr_to_f_seid() failed"); + ogs_free(pfcp_message); return NULL; } f_seid.seid = htobe64(sess->sgwu_sxa_seid); @@ -76,10 +83,12 @@ if (pdr_presence == true) j++; } - pfcp_message.h.type = type; - pkbuf = ogs_pfcp_build_msg(&pfcp_message); + pfcp_message->h.type = type; + pkbuf = ogs_pfcp_build_msg(pfcp_message); + ogs_expect(pkbuf); ogs_pfcp_pdrbuf_clear(); + ogs_free(pfcp_message); return pkbuf; } @@ -87,7 +96,7 @@ ogs_pkbuf_t *sgwu_sxa_build_session_modification_response(uint8_t type, sgwu_sess_t *sess, ogs_pfcp_pdr_t *created_pdr, int num_of_created_pdr) { - ogs_pfcp_message_t pfcp_message; + ogs_pfcp_message_t *pfcp_message = NULL; ogs_pfcp_session_modification_response_t *rsp = NULL; ogs_pkbuf_t *pkbuf = NULL; @@ -95,8 +104,13 @@ ogs_debug("Session Modification Response"); - rsp = &pfcp_message.pfcp_session_modification_response; - memset(&pfcp_message, 0, sizeof(ogs_pfcp_message_t)); + pfcp_message = ogs_calloc(1, sizeof(*pfcp_message)); + if (!pfcp_message) { + ogs_error("ogs_calloc() failed"); + return NULL; + } + + rsp = &pfcp_message->pfcp_session_modification_response; /* Cause */ rsp->cause.presence = 1; @@ -111,10 +125,12 @@ if (pdr_presence == true) j++; } - pfcp_message.h.type = type; - pkbuf = ogs_pfcp_build_msg(&pfcp_message); + pfcp_message->h.type = type; + pkbuf = ogs_pfcp_build_msg(pfcp_message); + ogs_expect(pkbuf); ogs_pfcp_pdrbuf_clear(); + ogs_free(pfcp_message); return pkbuf; } @@ -122,18 +138,29 @@ ogs_pkbuf_t *sgwu_sxa_build_session_deletion_response(uint8_t type, sgwu_sess_t *sess) { - ogs_pfcp_message_t pfcp_message; + ogs_pfcp_message_t *pfcp_message = NULL; ogs_pfcp_session_deletion_response_t *rsp = NULL; + ogs_pkbuf_t *pkbuf = NULL; ogs_debug("Session Deletion Response"); - rsp = &pfcp_message.pfcp_session_deletion_response; - memset(&pfcp_message, 0, sizeof(ogs_pfcp_message_t)); + pfcp_message = ogs_calloc(1, sizeof(*pfcp_message)); + if (!pfcp_message) { + ogs_error("ogs_calloc() failed"); + return NULL; + } + + rsp = &pfcp_message->pfcp_session_deletion_response; /* Cause */ rsp->cause.presence = 1; rsp->cause.u8 = OGS_PFCP_CAUSE_REQUEST_ACCEPTED; - pfcp_message.h.type = type; - return ogs_pfcp_build_msg(&pfcp_message); + pfcp_message->h.type = type; + pkbuf = ogs_pfcp_build_msg(pfcp_message); + ogs_expect(pkbuf); + + ogs_free(pfcp_message); + + return pkbuf; }
View file
open5gs_2.4.9.252.11aac.202301240007.tar.xz/src/smf/n4-build.c -> open5gs_2.4.9.256.596a2.202301250006.tar.xz/src/smf/n4-build.c
Changed
@@ -23,7 +23,7 @@ ogs_pkbuf_t *smf_n4_build_session_establishment_request( uint8_t type, smf_sess_t *sess) { - ogs_pfcp_message_t pfcp_message; + ogs_pfcp_message_t *pfcp_message = NULL; ogs_pfcp_session_establishment_request_t *req = NULL; ogs_pkbuf_t *pkbuf = NULL; @@ -47,8 +47,13 @@ smf_ue = sess->smf_ue; ogs_assert(smf_ue); - req = &pfcp_message.pfcp_session_establishment_request; - memset(&pfcp_message, 0, sizeof(ogs_pfcp_message_t)); + pfcp_message = ogs_calloc(1, sizeof(*pfcp_message)); + if (!pfcp_message) { + ogs_error("ogs_calloc() failed"); + return NULL; + } + + req = &pfcp_message->pfcp_session_establishment_request; /* Node ID */ rv = ogs_pfcp_sockaddr_to_node_id( @@ -57,6 +62,7 @@ &node_id, &len); if (rv != OGS_OK) { ogs_error("ogs_pfcp_sockaddr_to_node_id() failed"); + ogs_free(pfcp_message); return NULL; } req->node_id.presence = 1; @@ -69,6 +75,7 @@ &f_seid, &len); if (rv != OGS_OK) { ogs_error("ogs_pfcp_sockaddr_to_f_seid() failed"); + ogs_free(pfcp_message); return NULL; } f_seid.seid = htobe64(sess->smf_n4_seid); @@ -155,10 +162,12 @@ req->s_nssai.data = &sess->s_nssai; } - pfcp_message.h.type = type; - pkbuf = ogs_pfcp_build_msg(&pfcp_message); + pfcp_message->h.type = type; + pkbuf = ogs_pfcp_build_msg(pfcp_message); + ogs_expect(pkbuf); ogs_pfcp_pdrbuf_clear(); + ogs_free(pfcp_message); return pkbuf; } @@ -170,7 +179,7 @@ ogs_pfcp_urr_t *urr = NULL; int i; - ogs_pfcp_message_t pfcp_message; + ogs_pfcp_message_t *pfcp_message = NULL; ogs_pfcp_session_modification_request_t *req = NULL; ogs_pkbuf_t *pkbuf = NULL; @@ -188,8 +197,13 @@ modify_flags = xact->modify_flags; ogs_assert(modify_flags); - req = &pfcp_message.pfcp_session_modification_request; - memset(&pfcp_message, 0, sizeof(ogs_pfcp_message_t)); + pfcp_message = ogs_calloc(1, sizeof(*pfcp_message)); + if (!pfcp_message) { + ogs_error("ogs_calloc() failed"); + return NULL; + } + + req = &pfcp_message->pfcp_session_modification_request; if (modify_flags & OGS_PFCP_MODIFY_CREATE) { ogs_pfcp_pdrbuf_init(); @@ -281,20 +295,23 @@ i++; } - pfcp_message.h.type = type; - pkbuf = ogs_pfcp_build_msg(&pfcp_message); + pfcp_message->h.type = type; + pkbuf = ogs_pfcp_build_msg(pfcp_message); + ogs_expect(pkbuf); if (modify_flags & OGS_PFCP_MODIFY_CREATE) { ogs_pfcp_pdrbuf_clear(); } + ogs_free(pfcp_message); + return pkbuf; } ogs_pkbuf_t *smf_n4_build_qos_flow_to_modify_list( uint8_t type, smf_sess_t *sess, ogs_pfcp_xact_t *xact) { - ogs_pfcp_message_t pfcp_message; + ogs_pfcp_message_t *pfcp_message = NULL; ogs_pfcp_session_modification_request_t *req = NULL; ogs_pkbuf_t *pkbuf = NULL; @@ -319,8 +336,13 @@ modify_flags = xact->modify_flags; ogs_assert(modify_flags); - req = &pfcp_message.pfcp_session_modification_request; - memset(&pfcp_message, 0, sizeof(ogs_pfcp_message_t)); + pfcp_message = ogs_calloc(1, sizeof(*pfcp_message)); + if (!pfcp_message) { + ogs_error("ogs_calloc() failed"); + return NULL; + } + + req = &pfcp_message->pfcp_session_modification_request; if (modify_flags & (OGS_PFCP_MODIFY_CREATE| @@ -491,8 +513,9 @@ } } - pfcp_message.h.type = type; - pkbuf = ogs_pfcp_build_msg(&pfcp_message); + pfcp_message->h.type = type; + pkbuf = ogs_pfcp_build_msg(pfcp_message); + ogs_expect(pkbuf); if (modify_flags & (OGS_PFCP_MODIFY_CREATE| @@ -502,17 +525,31 @@ ogs_pfcp_pdrbuf_clear(); } + ogs_free(pfcp_message); + return pkbuf; } ogs_pkbuf_t *smf_n4_build_session_deletion_request( uint8_t type, smf_sess_t *sess) { - ogs_pfcp_message_t pfcp_message; + ogs_pfcp_message_t *pfcp_message = NULL; + ogs_pkbuf_t *pkbuf = NULL; ogs_debug("Session Deletion Request"); ogs_assert(sess); - pfcp_message.h.type = type; - return ogs_pfcp_build_msg(&pfcp_message); + pfcp_message = ogs_calloc(1, sizeof(*pfcp_message)); + if (!pfcp_message) { + ogs_error("ogs_calloc() failed"); + return NULL; + } + + pfcp_message->h.type = type; + pkbuf = ogs_pfcp_build_msg(pfcp_message); + ogs_expect(pkbuf); + + ogs_free(pfcp_message); + + return pkbuf; }
View file
open5gs_2.4.9.252.11aac.202301240007.tar.xz/src/upf/n4-build.c -> open5gs_2.4.9.256.596a2.202301250006.tar.xz/src/upf/n4-build.c
Changed
@@ -23,7 +23,7 @@ ogs_pkbuf_t *upf_n4_build_session_establishment_response(uint8_t type, upf_sess_t *sess, ogs_pfcp_pdr_t *created_pdr, int num_of_created_pdr) { - ogs_pfcp_message_t pfcp_message; + ogs_pfcp_message_t *pfcp_message = NULL; ogs_pfcp_session_establishment_response_t *rsp = NULL; ogs_pkbuf_t *pkbuf = NULL; @@ -35,8 +35,13 @@ ogs_debug("Session Establishment Response"); - rsp = &pfcp_message.pfcp_session_establishment_response; - memset(&pfcp_message, 0, sizeof(ogs_pfcp_message_t)); + pfcp_message = ogs_calloc(1, sizeof(*pfcp_message)); + if (!pfcp_message) { + ogs_error("ogs_calloc() failed"); + return NULL; + } + + rsp = &pfcp_message->pfcp_session_establishment_response; /* Node ID */ ogs_pfcp_sockaddr_to_node_id( @@ -69,10 +74,12 @@ if (pdr_presence == true) j++; } - pfcp_message.h.type = type; - pkbuf = ogs_pfcp_build_msg(&pfcp_message); + pfcp_message->h.type = type; + pkbuf = ogs_pfcp_build_msg(pfcp_message); + ogs_expect(pkbuf); ogs_pfcp_pdrbuf_clear(); + ogs_free(pfcp_message); return pkbuf; } @@ -80,7 +87,7 @@ ogs_pkbuf_t *upf_n4_build_session_modification_response(uint8_t type, upf_sess_t *sess, ogs_pfcp_pdr_t *created_pdr, int num_of_created_pdr) { - ogs_pfcp_message_t pfcp_message; + ogs_pfcp_message_t *pfcp_message = NULL; ogs_pfcp_session_modification_response_t *rsp = NULL; ogs_pkbuf_t *pkbuf = NULL; @@ -88,8 +95,13 @@ ogs_debug("Session Modification Response"); - rsp = &pfcp_message.pfcp_session_modification_response; - memset(&pfcp_message, 0, sizeof(ogs_pfcp_message_t)); + pfcp_message = ogs_calloc(1, sizeof(*pfcp_message)); + if (!pfcp_message) { + ogs_error("ogs_calloc() failed"); + return NULL; + } + + rsp = &pfcp_message->pfcp_session_modification_response; /* Cause */ rsp->cause.presence = 1; @@ -104,10 +116,12 @@ if (pdr_presence == true) j++; } - pfcp_message.h.type = type; - pkbuf = ogs_pfcp_build_msg(&pfcp_message); + pfcp_message->h.type = type; + pkbuf = ogs_pfcp_build_msg(pfcp_message); + ogs_expect(pkbuf); ogs_pfcp_pdrbuf_clear(); + ogs_free(pfcp_message); return pkbuf; }
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
.