Projects
osmocom:nightly
open5gs
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 5
View file
open5gs_2.4.8.202206290002.dsc -> open5gs_2.4.8.202206300002.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-ausf, open5gs-udm, open5gs-pcf, open5gs-nssf, open5gs-bsf, open5gs-udr, open5gs, open5gs-dbg Architecture: any -Version: 2.4.8.202206290002 +Version: 2.4.8.202206300002 Maintainer: Harald Welte <laforge@gnumonks.org> Uploaders: Sukchan Lee <acetcom@gmail.com> Homepage: https://open5gs.org @@ -30,8 +30,8 @@ open5gs-udr deb net optional arch=any open5gs-upf deb net optional arch=any Checksums-Sha1: - 53a50e0e411911acc1cef1469c88da32969565e6 11443020 open5gs_2.4.8.202206290002.tar.xz + 70a011ee684d644a03b3eb5f70f9431c117c5744 11444120 open5gs_2.4.8.202206300002.tar.xz Checksums-Sha256: - baff7882ee43cf7d475c76217e97495534218ca4aad135e0fa94080d00062e92 11443020 open5gs_2.4.8.202206290002.tar.xz + ab387b7f01f43118ca0e224189627812f200a7050b327b706f553fde05edb37c 11444120 open5gs_2.4.8.202206300002.tar.xz Files: - 8dae58aaae8f17c03ca20421d53e0a6a 11443020 open5gs_2.4.8.202206290002.tar.xz + 7447ec56414ce907330f78528419f548 11444120 open5gs_2.4.8.202206300002.tar.xz
View file
open5gs_2.4.8.202206290002.tar.xz/debian/changelog -> open5gs_2.4.8.202206300002.tar.xz/debian/changelog
Changed
@@ -1,8 +1,8 @@ -open5gs (2.4.8.202206290002) UNRELEASED; urgency=medium +open5gs (2.4.8.202206300002) UNRELEASED; urgency=medium * Snapshot build - -- Sukchan Lee <acetcom@gmail.com> Wed, 29 Jun 2022 00:09:00 +0000 + -- Sukchan Lee <acetcom@gmail.com> Thu, 30 Jun 2022 00:09:09 +0000 open5gs (2.4.8) unstable; urgency=medium
View file
open5gs_2.4.8.202206290002.tar.xz/debian/control -> open5gs_2.4.8.202206300002.tar.xz/debian/control
Changed
@@ -31,7 +31,7 @@ Package: open5gs-common Architecture: any Multi-Arch: same -Depends: osmocom-nightly (= 1.0.0.202206290002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202206300002), ${shlibs:Depends}, ${misc:Depends} Description: 5G Core and EPC (Shared Files) Open5GS is a C-language implementation of 5G Core and EPC @@ -43,7 +43,7 @@ Package: open5gs-mme Architecture: any Multi-Arch: same -Depends: osmocom-nightly (= 1.0.0.202206290002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202206300002), ${shlibs:Depends}, ${misc:Depends}, open5gs-common (= ${binary:Version}) Description: MME (Mobility Management Entity) @@ -58,7 +58,7 @@ Package: open5gs-sgwc Architecture: any Multi-Arch: same -Depends: osmocom-nightly (= 1.0.0.202206290002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202206300002), ${shlibs:Depends}, ${misc:Depends}, open5gs-common (= ${binary:Version}) Description: SGW-C (Serving Gateway - Control Plane) @@ -72,7 +72,7 @@ Package: open5gs-smf Architecture: any Multi-Arch: same -Depends: osmocom-nightly (= 1.0.0.202206290002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202206300002), ${shlibs:Depends}, ${misc:Depends}, open5gs-common (= ${binary:Version}) Description: SMF (Session Management Function) @@ -84,7 +84,7 @@ Package: open5gs-amf Architecture: any Multi-Arch: same -Depends: osmocom-nightly (= 1.0.0.202206290002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202206300002), ${shlibs:Depends}, ${misc:Depends}, open5gs-common (= ${binary:Version}) Description: AMF (Access and Mobility Management Function) @@ -96,7 +96,7 @@ Package: open5gs-sgwu Architecture: any Multi-Arch: same -Depends: osmocom-nightly (= 1.0.0.202206290002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202206300002), ${shlibs:Depends}, ${misc:Depends}, open5gs-common (= ${binary:Version}) Description: SGW-U (Serving Gateway - User Plane) @@ -110,7 +110,7 @@ Package: open5gs-upf Architecture: any Multi-Arch: same -Depends: osmocom-nightly (= 1.0.0.202206290002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202206300002), ${shlibs:Depends}, ${misc:Depends}, udev, open5gs-common (= ${binary:Version}) @@ -123,7 +123,7 @@ Package: open5gs-hss Architecture: any Multi-Arch: same -Depends: osmocom-nightly (= 1.0.0.202206290002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202206300002), ${shlibs:Depends}, ${misc:Depends}, mongodb-org | mongodb, open5gs-common (= ${binary:Version}) @@ -140,7 +140,7 @@ Package: open5gs-pcrf Architecture: any Multi-Arch: same -Depends: osmocom-nightly (= 1.0.0.202206290002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202206300002), ${shlibs:Depends}, ${misc:Depends}, mongodb-org | mongodb, open5gs-common (= ${binary:Version}) @@ -156,7 +156,7 @@ Package: open5gs-nrf Architecture: any Multi-Arch: same -Depends: osmocom-nightly (= 1.0.0.202206290002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202206300002), ${shlibs:Depends}, ${misc:Depends}, open5gs-common (= ${binary:Version}) Description: NRF (Network Repository Function) @@ -168,7 +168,7 @@ Package: open5gs-ausf Architecture: any Multi-Arch: same -Depends: osmocom-nightly (= 1.0.0.202206290002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202206300002), ${shlibs:Depends}, ${misc:Depends}, open5gs-common (= ${binary:Version}) Description: AUSF (Authentication Server Function) @@ -180,7 +180,7 @@ Package: open5gs-udm Architecture: any Multi-Arch: same -Depends: osmocom-nightly (= 1.0.0.202206290002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202206300002), ${shlibs:Depends}, ${misc:Depends}, open5gs-common (= ${binary:Version}) Description: UDM (Unified Data Management) @@ -192,7 +192,7 @@ Package: open5gs-pcf Architecture: any Multi-Arch: same -Depends: osmocom-nightly (= 1.0.0.202206290002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202206300002), ${shlibs:Depends}, ${misc:Depends}, open5gs-common (= ${binary:Version}) Description: PCF (Policy Control Function) @@ -204,7 +204,7 @@ Package: open5gs-nssf Architecture: any Multi-Arch: same -Depends: osmocom-nightly (= 1.0.0.202206290002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202206300002), ${shlibs:Depends}, ${misc:Depends}, open5gs-common (= ${binary:Version}) Description: NSSF (Network Slice Selection Function) @@ -216,7 +216,7 @@ Package: open5gs-bsf Architecture: any Multi-Arch: same -Depends: osmocom-nightly (= 1.0.0.202206290002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202206300002), ${shlibs:Depends}, ${misc:Depends}, open5gs-common (= ${binary:Version}) Description: BSF (Binding Support Function) @@ -228,7 +228,7 @@ Package: open5gs-udr Architecture: any Multi-Arch: same -Depends: osmocom-nightly (= 1.0.0.202206290002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202206300002), ${shlibs:Depends}, ${misc:Depends}, open5gs-common (= ${binary:Version}) Description: UDR (Unified Data Repository) @@ -240,7 +240,7 @@ Package: open5gs Architecture: any Multi-Arch: same -Depends: osmocom-nightly (= 1.0.0.202206290002), ${misc:Depends}, +Depends: osmocom-nightly (= 1.0.0.202206300002), ${misc:Depends}, open5gs-common (= ${binary:Version}), open5gs-mme (= ${binary:Version}), open5gs-sgwc (= ${binary:Version}), @@ -266,7 +266,7 @@ Package: open5gs-dbg Architecture: any Multi-Arch: same -Depends: osmocom-nightly (= 1.0.0.202206290002), ${misc:Depends}, +Depends: osmocom-nightly (= 1.0.0.202206300002), ${misc:Depends}, open5gs (= ${binary:Version}) Description: Debug symbols for Open5GS Open5GS is a C-language implementation of 5G Core and EPC
View file
open5gs_2.4.8.202206290002.tar.xz/lib/core/ogs-3gpp-types.c -> open5gs_2.4.8.202206300002.tar.xz/lib/core/ogs-3gpp-types.c
Changed
@@ -427,12 +427,19 @@ ogs_assert(list); addr = ogs_calloc(1, sizeof(ogs_sockaddr_t)); - ogs_expect_or_return_val(addr, OGS_ERROR); + if (!addr) { + ogs_error("ogs_calloc() failed"); + return OGS_ERROR; + } addr->ogs_sa_family = AF_INET; addr->ogs_sin_port = htobe16(port); addr6 = ogs_calloc(1, sizeof(ogs_sockaddr_t)); - ogs_expect_or_return_val(addr6, OGS_ERROR); + if (!addr6) { + ogs_error("ogs_calloc() failed"); + ogs_free(addr); + return OGS_ERROR; + } addr6->ogs_sa_family = AF_INET6; addr6->ogs_sin_port = htobe16(port); @@ -454,6 +461,7 @@ *list = addr6; } else { + ogs_error("No IPv4 and IPv6"); ogs_free(addr); ogs_free(addr6); return OGS_ERROR;
View file
open5gs_2.4.8.202206290002.tar.xz/lib/core/ogs-tlv-msg.c -> open5gs_2.4.8.202206300002.tar.xz/lib/core/ogs-tlv-msg.c
Changed
@@ -36,6 +36,22 @@ OGS_TLV_MORE, "More", 0, 7, 0, 0, { NULL } }; ogs_tlv_desc_t ogs_tlv_desc_more8 = { OGS_TLV_MORE, "More", 0, 8, 0, 0, { NULL } }; +ogs_tlv_desc_t ogs_tlv_desc_more9 = { + OGS_TLV_MORE, "More", 0, 9, 0, 0, { NULL } }; +ogs_tlv_desc_t ogs_tlv_desc_more10 = { + OGS_TLV_MORE, "More", 0, 10, 0, 0, { NULL } }; +ogs_tlv_desc_t ogs_tlv_desc_more11 = { + OGS_TLV_MORE, "More", 0, 11, 0, 0, { NULL } }; +ogs_tlv_desc_t ogs_tlv_desc_more12 = { + OGS_TLV_MORE, "More", 0, 12, 0, 0, { NULL } }; +ogs_tlv_desc_t ogs_tlv_desc_more13 = { + OGS_TLV_MORE, "More", 0, 13, 0, 0, { NULL } }; +ogs_tlv_desc_t ogs_tlv_desc_more14 = { + OGS_TLV_MORE, "More", 0, 14, 0, 0, { NULL } }; +ogs_tlv_desc_t ogs_tlv_desc_more15 = { + OGS_TLV_MORE, "More", 0, 15, 0, 0, { NULL } }; +ogs_tlv_desc_t ogs_tlv_desc_more16 = { + OGS_TLV_MORE, "More", 0, 16, 0, 0, { NULL } }; /* Return specific TLV mode based on its TLV description type and the msg * provided mode (used to know the type length) */
View file
open5gs_2.4.8.202206290002.tar.xz/lib/core/ogs-tlv-msg.h -> open5gs_2.4.8.202206300002.tar.xz/lib/core/ogs-tlv-msg.h
Changed
@@ -31,7 +31,7 @@ #define OGS_TLV_MAX_HEADROOM 16 #define OGS_TLV_VARIABLE_LEN 0 -#define OGS_TLV_MAX_MORE 8 +#define OGS_TLV_MAX_MORE 16 #define OGS_TLV_1_OR_MORE(__v) __vOGS_TLV_MAX_MORE #define OGS_TLV_MAX_CHILD_DESC 128 @@ -83,6 +83,14 @@ extern ogs_tlv_desc_t ogs_tlv_desc_more6; extern ogs_tlv_desc_t ogs_tlv_desc_more7; extern ogs_tlv_desc_t ogs_tlv_desc_more8; +extern ogs_tlv_desc_t ogs_tlv_desc_more9; +extern ogs_tlv_desc_t ogs_tlv_desc_more10; +extern ogs_tlv_desc_t ogs_tlv_desc_more11; +extern ogs_tlv_desc_t ogs_tlv_desc_more12; +extern ogs_tlv_desc_t ogs_tlv_desc_more13; +extern ogs_tlv_desc_t ogs_tlv_desc_more14; +extern ogs_tlv_desc_t ogs_tlv_desc_more15; +extern ogs_tlv_desc_t ogs_tlv_desc_more16; typedef uint64_t ogs_tlv_presence_t;
View file
open5gs_2.4.8.202206290002.tar.xz/lib/gtp/context.c -> open5gs_2.4.8.202206300002.tar.xz/lib/gtp/context.c
Changed
@@ -570,7 +570,10 @@ ogs_app()->parameter.no_ipv4, ogs_app()->parameter.no_ipv6, ogs_app()->parameter.prefer_ipv4); - ogs_assert(addr); + if (!addr) { + ogs_error("ogs_filter_ip_version() failed"); + return NULL; + } #if 0 /* deprecated */ rv = ogs_socknode_fill_scope_id_in_local(addr); @@ -578,10 +581,18 @@ #endif node = ogs_gtp_node_new(addr); - ogs_assert(node); + if (!node) { + ogs_error("ogs_gtp_node_new() failed"); + ogs_freeaddrinfo(addr); + return NULL; + } rv = ogs_gtp2_f_teid_to_ip(f_teid, &node->ip); - ogs_expect_or_return_val(rv == OGS_OK, NULL); + if (rv != OGS_OK) { + ogs_error("ogs_gtp2_f_teid_to_ip() failed"); + ogs_freeaddrinfo(addr); + return NULL; + } ogs_list_add(list, node); @@ -598,8 +609,12 @@ ogs_assert(OGS_OK == ogs_copyaddrinfo(&new, addr)); gnode = ogs_gtp_node_new(new); + if (!gnode) { + ogs_error("ogs_gtp_node_new() failed"); + ogs_freeaddrinfo(new); + return NULL; + } - ogs_assert(gnode); memcpy(&gnode->addr, new, sizeof gnode->addr); ogs_list_add(list, gnode); @@ -680,15 +695,22 @@ ogs_app()->parameter.no_ipv4, ogs_app()->parameter.no_ipv6, ogs_app()->parameter.prefer_ipv4); - ogs_expect_or_return_val(addr, NULL); + if (!addr) { + ogs_error("ogs_filter_ip_version() failed"); + return NULL; + } #if 0 /* deprecated */ rv = ogs_socknode_fill_scope_id_in_local(addr); - ogs_expect_or_return_val(rv == OGS_OK, NULL); + ogs_assert(rv == OGS_OK); #endif node = ogs_gtp_node_new(addr); - ogs_expect_or_return_val(node, NULL); + if (!node) { + ogs_error("ogs_gtp_node_new() failed"); + ogs_freeaddrinfo(addr); + return NULL; + } memcpy(&node->ip, ip, sizeof(*ip));
View file
open5gs_2.4.8.202206290002.tar.xz/lib/gtp/v2/conv.c -> open5gs_2.4.8.202206300002.tar.xz/lib/gtp/v2/conv.c
Changed
@@ -33,7 +33,11 @@ addr->ogs_sin_port = htobe16(port); addr6 = ogs_calloc(1, sizeof(ogs_sockaddr_t)); - ogs_expect_or_return_val(addr6, OGS_ERROR); + if (!addr6) { + ogs_error("ogs_calloc() failed"); + ogs_free(addr); + return OGS_ERROR; + } addr6->ogs_sa_family = AF_INET6; addr6->ogs_sin_port = htobe16(port); @@ -55,9 +59,9 @@ *list = addr6; } else { + ogs_error("No IPv4 or IPv6"); ogs_free(addr); ogs_free(addr6); - ogs_error("No IPv4 or IPv6"); return OGS_ERROR; }
View file
open5gs_2.4.8.202206290002.tar.xz/lib/pfcp/message.c -> open5gs_2.4.8.202206300002.tar.xz/lib/pfcp/message.c
Changed
@@ -20,7 +20,7 @@ /******************************************************************************* * This file had been created by pfcp-tlv.py script v0.1.0 * Please do not modify this file but regenerate it via script. - * Created on: 2022-06-12 08:57:15.347805 by acetcom + * Created on: 2022-06-29 14:29:16.181253 by acetcom * from 29244-g91-modified.docx ******************************************************************************/ @@ -3778,11 +3778,11 @@ &ogs_pfcp_tlv_desc_node_id, &ogs_pfcp_tlv_desc_f_seid, &ogs_pfcp_tlv_desc_create_pdr, - &ogs_tlv_desc_more8, + &ogs_tlv_desc_more16, &ogs_pfcp_tlv_desc_create_far, - &ogs_tlv_desc_more8, + &ogs_tlv_desc_more16, &ogs_pfcp_tlv_desc_create_urr, - &ogs_tlv_desc_more2, + &ogs_tlv_desc_more16, &ogs_pfcp_tlv_desc_create_qer, &ogs_tlv_desc_more4, &ogs_pfcp_tlv_desc_create_bar, @@ -3818,7 +3818,7 @@ &ogs_pfcp_tlv_desc_offending_ie, &ogs_pfcp_tlv_desc_f_seid, &ogs_pfcp_tlv_desc_created_pdr, - &ogs_tlv_desc_more8, + &ogs_tlv_desc_more16, &ogs_pfcp_tlv_desc_load_control_information, &ogs_pfcp_tlv_desc_overload_control_information, &ogs_pfcp_tlv_desc_fq_csid, @@ -3837,31 +3837,31 @@ 0, 0, 0, 0, { &ogs_pfcp_tlv_desc_f_seid, &ogs_pfcp_tlv_desc_remove_pdr, - &ogs_tlv_desc_more8, + &ogs_tlv_desc_more16, &ogs_pfcp_tlv_desc_remove_far, - &ogs_tlv_desc_more8, + &ogs_tlv_desc_more16, &ogs_pfcp_tlv_desc_remove_urr, - &ogs_tlv_desc_more2, + &ogs_tlv_desc_more16, &ogs_pfcp_tlv_desc_remove_qer, &ogs_tlv_desc_more4, &ogs_pfcp_tlv_desc_remove_bar, &ogs_pfcp_tlv_desc_remove_traffic_endpoint, &ogs_pfcp_tlv_desc_create_pdr, - &ogs_tlv_desc_more8, + &ogs_tlv_desc_more16, &ogs_pfcp_tlv_desc_create_far, - &ogs_tlv_desc_more8, + &ogs_tlv_desc_more16, &ogs_pfcp_tlv_desc_create_urr, - &ogs_tlv_desc_more2, + &ogs_tlv_desc_more16, &ogs_pfcp_tlv_desc_create_qer, &ogs_tlv_desc_more4, &ogs_pfcp_tlv_desc_create_bar, &ogs_pfcp_tlv_desc_create_traffic_endpoint, &ogs_pfcp_tlv_desc_update_pdr, - &ogs_tlv_desc_more8, + &ogs_tlv_desc_more16, &ogs_pfcp_tlv_desc_update_far, - &ogs_tlv_desc_more8, + &ogs_tlv_desc_more16, &ogs_pfcp_tlv_desc_update_urr, - &ogs_tlv_desc_more2, + &ogs_tlv_desc_more16, &ogs_pfcp_tlv_desc_update_qer, &ogs_tlv_desc_more4, &ogs_pfcp_tlv_desc_update_bar_session_modification_request, @@ -3900,7 +3900,7 @@ &ogs_pfcp_tlv_desc_cause, &ogs_pfcp_tlv_desc_offending_ie, &ogs_pfcp_tlv_desc_created_pdr, - &ogs_tlv_desc_more8, + &ogs_tlv_desc_more16, &ogs_pfcp_tlv_desc_load_control_information, &ogs_pfcp_tlv_desc_overload_control_information, &ogs_pfcp_tlv_desc_usage_report_session_modification_response,
View file
open5gs_2.4.8.202206290002.tar.xz/lib/pfcp/message.h -> open5gs_2.4.8.202206300002.tar.xz/lib/pfcp/message.h
Changed
@@ -20,7 +20,7 @@ /******************************************************************************* * This file had been created by pfcp-tlv.py script v0.1.0 * Please do not modify this file but regenerate it via script. - * Created on: 2022-06-12 08:57:15.335605 by acetcom + * Created on: 2022-06-29 14:29:16.169884 by acetcom * from 29244-g91-modified.docx ******************************************************************************/ @@ -1699,9 +1699,9 @@ typedef struct ogs_pfcp_session_establishment_request_s { ogs_pfcp_tlv_node_id_t node_id; ogs_pfcp_tlv_f_seid_t cp_f_seid; - ogs_pfcp_tlv_create_pdr_t create_pdr8; - ogs_pfcp_tlv_create_far_t create_far8; - ogs_pfcp_tlv_create_urr_t create_urr2; + ogs_pfcp_tlv_create_pdr_t create_pdr16; + ogs_pfcp_tlv_create_far_t create_far16; + ogs_pfcp_tlv_create_urr_t create_urr16; ogs_pfcp_tlv_create_qer_t create_qer4; ogs_pfcp_tlv_create_bar_t create_bar; ogs_pfcp_tlv_create_traffic_endpoint_t create_traffic_endpoint; @@ -1730,7 +1730,7 @@ ogs_pfcp_tlv_cause_t cause; ogs_pfcp_tlv_offending_ie_t offending_ie; ogs_pfcp_tlv_f_seid_t up_f_seid; - ogs_pfcp_tlv_created_pdr_t created_pdr8; + ogs_pfcp_tlv_created_pdr_t created_pdr16; ogs_pfcp_tlv_load_control_information_t load_control_information; ogs_pfcp_tlv_overload_control_information_t overload_control_information; ogs_pfcp_tlv_fq_csid_t pgw_u_sgw_u_fq_csid; @@ -1743,21 +1743,21 @@ typedef struct ogs_pfcp_session_modification_request_s { ogs_pfcp_tlv_f_seid_t cp_f_seid; - ogs_pfcp_tlv_remove_pdr_t remove_pdr8; - ogs_pfcp_tlv_remove_far_t remove_far8; - ogs_pfcp_tlv_remove_urr_t remove_urr2; + ogs_pfcp_tlv_remove_pdr_t remove_pdr16; + ogs_pfcp_tlv_remove_far_t remove_far16; + ogs_pfcp_tlv_remove_urr_t remove_urr16; ogs_pfcp_tlv_remove_qer_t remove_qer4; ogs_pfcp_tlv_remove_bar_t remove_bar; ogs_pfcp_tlv_remove_traffic_endpoint_t remove_traffic_endpoint; - ogs_pfcp_tlv_create_pdr_t create_pdr8; - ogs_pfcp_tlv_create_far_t create_far8; - ogs_pfcp_tlv_create_urr_t create_urr2; + ogs_pfcp_tlv_create_pdr_t create_pdr16; + ogs_pfcp_tlv_create_far_t create_far16; + ogs_pfcp_tlv_create_urr_t create_urr16; ogs_pfcp_tlv_create_qer_t create_qer4; ogs_pfcp_tlv_create_bar_t create_bar; ogs_pfcp_tlv_create_traffic_endpoint_t create_traffic_endpoint; - ogs_pfcp_tlv_update_pdr_t update_pdr8; - ogs_pfcp_tlv_update_far_t update_far8; - ogs_pfcp_tlv_update_urr_t update_urr2; + ogs_pfcp_tlv_update_pdr_t update_pdr16; + ogs_pfcp_tlv_update_far_t update_far16; + ogs_pfcp_tlv_update_urr_t update_urr16; ogs_pfcp_tlv_update_qer_t update_qer4; ogs_pfcp_tlv_update_bar_session_modification_request_t update_bar; ogs_pfcp_tlv_update_traffic_endpoint_t update_traffic_endpoint; @@ -1789,7 +1789,7 @@ typedef struct ogs_pfcp_session_modification_response_s { ogs_pfcp_tlv_cause_t cause; ogs_pfcp_tlv_offending_ie_t offending_ie; - ogs_pfcp_tlv_created_pdr_t created_pdr8; + ogs_pfcp_tlv_created_pdr_t created_pdr16; ogs_pfcp_tlv_load_control_information_t load_control_information; ogs_pfcp_tlv_overload_control_information_t overload_control_information; ogs_pfcp_tlv_usage_report_session_modification_response_t usage_report8;
View file
open5gs_2.4.8.202206290002.tar.xz/lib/pfcp/support/cache/tlv-msg-50.py -> open5gs_2.4.8.202206300002.tar.xz/lib/pfcp/support/cache/tlv-msg-50.py
Changed
@@ -1,12 +1,12 @@ ies = ies.append({ "ie_type" : "Node ID", "ie_value" : "Node ID", "presence" : "M", "tlv_more" : "0", "comment" : "This IE shall contain the unique identifier of the sending Node."}) ies.append({ "ie_type" : "F-SEID", "ie_value" : "CP F-SEID", "presence" : "M", "tlv_more" : "0", "comment" : "This IE shall contain the unique identifier allocated by the CP function identifying the session."}) -type_list"Create PDR""max_tlv_more" = "7" -ies.append({ "ie_type" : "Create PDR", "ie_value" : "Create PDR", "presence" : "M", "tlv_more" : "7", "comment" : "This IE shall be present for at least one PDR to be associated to the PFCP session.Several IEs with the same IE type may be present to represent multiple PDRs.See Table 7.5.2.2-1."}) -type_list"Create FAR""max_tlv_more" = "7" -ies.append({ "ie_type" : "Create FAR", "ie_value" : "Create FAR", "presence" : "M", "tlv_more" : "7", "comment" : "This IE shall be present for at least one FAR to be associated to the PFCP session.Several IEs with the same IE type may be present to represent multiple FARs.See Table 7.5.2.3-1."}) -type_list"Create URR""max_tlv_more" = "1" -ies.append({ "ie_type" : "Create URR", "ie_value" : "Create URR", "presence" : "C", "tlv_more" : "1", "comment" : "This IE shall be present if a measurement action shall be applied to packets matching one or more PDR(s) of this PFCP session.Several IEs within the same IE type may be present to represent multiple URRs.See Table 7.5.2.4-1."}) +type_list"Create PDR""max_tlv_more" = "15" +ies.append({ "ie_type" : "Create PDR", "ie_value" : "Create PDR", "presence" : "M", "tlv_more" : "15", "comment" : "This IE shall be present for at least one PDR to be associated to the PFCP session.Several IEs with the same IE type may be present to represent multiple PDRs.See Table 7.5.2.2-1."}) +type_list"Create FAR""max_tlv_more" = "15" +ies.append({ "ie_type" : "Create FAR", "ie_value" : "Create FAR", "presence" : "M", "tlv_more" : "15", "comment" : "This IE shall be present for at least one FAR to be associated to the PFCP session.Several IEs with the same IE type may be present to represent multiple FARs.See Table 7.5.2.3-1."}) +type_list"Create URR""max_tlv_more" = "15" +ies.append({ "ie_type" : "Create URR", "ie_value" : "Create URR", "presence" : "C", "tlv_more" : "15", "comment" : "This IE shall be present if a measurement action shall be applied to packets matching one or more PDR(s) of this PFCP session.Several IEs within the same IE type may be present to represent multiple URRs.See Table 7.5.2.4-1."}) type_list"Create QER""max_tlv_more" = "3" ies.append({ "ie_type" : "Create QER", "ie_value" : "Create QER", "presence" : "C", "tlv_more" : "3", "comment" : "This IE shall be present if a QoS enforcement or QoS marking action shall be applied to packets matching one or more PDR(s) of this PFCP session.Several IEs within the same IE type may be present to represent multiple QERs.See Table 7.5.2.5-1."}) ies.append({ "ie_type" : "Create BAR", "ie_value" : "Create BAR", "presence" : "O", "tlv_more" : "0", "comment" : "When present, this IE shall contain the buffering instructions to be applied by the UP function to any FAR of this PFCP session set with the Apply Action requesting the packets to be buffered and with a BAR ID IE referring to this BAR. See table 7.5.2.6-1."})
View file
open5gs_2.4.8.202206290002.tar.xz/lib/pfcp/support/cache/tlv-msg-51.py -> open5gs_2.4.8.202206300002.tar.xz/lib/pfcp/support/cache/tlv-msg-51.py
Changed
@@ -3,8 +3,8 @@ ies.append({ "ie_type" : "Cause", "ie_value" : "Cause", "presence" : "M", "tlv_more" : "0", "comment" : "This IE shall indicate the acceptance or the rejection of the corresponding request message."}) ies.append({ "ie_type" : "Offending IE", "ie_value" : "Offending IE", "presence" : "C", "tlv_more" : "0", "comment" : "This IE shall be included if the rejection is due to a conditional or mandatory IE missing or faulty."}) ies.append({ "ie_type" : "F-SEID", "ie_value" : "UP F-SEID", "presence" : "C", "tlv_more" : "0", "comment" : "This IE shall be present if the cause is set to Request accepted (success). When present, it shall contain the unique identifier allocated by the UP function identifying the session."}) -type_list"Created PDR""max_tlv_more" = "7" -ies.append({ "ie_type" : "Created PDR", "ie_value" : "Created PDR", "presence" : "C", "tlv_more" : "7", "comment" : "This IE shall be present if the cause is set to success and the UP function was requested to allocate a local F-TEID or a UE IP address/prefix for the PDR.When present, this IE shall contain the PDR information associated to the PFCP session. There may be several instances of this IE.See table 7.5.3.2-1."}) +type_list"Created PDR""max_tlv_more" = "15" +ies.append({ "ie_type" : "Created PDR", "ie_value" : "Created PDR", "presence" : "C", "tlv_more" : "15", "comment" : "This IE shall be present if the cause is set to success and the UP function was requested to allocate a local F-TEID or a UE IP address/prefix for the PDR.When present, this IE shall contain the PDR information associated to the PFCP session. There may be several instances of this IE.See table 7.5.3.2-1."}) ies.append({ "ie_type" : "Load Control Information", "ie_value" : "Load Control Information", "presence" : "O", "tlv_more" : "0", "comment" : "The UP function may include this IE if it supports the load control feature and the feature is activated in the network.See Table 7.5.3.3-1."}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "Overload Control Information", "presence" : "O", "tlv_more" : "0", "comment" : "During an overload condition, the UP function may include this IE if it supports the overload control feature and the feature is activated in the network.See Table 7.5.3.4-1."}) ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "PGW-U/SGW-U FQ-CSID", "presence" : "C", "tlv_more" : "0", "comment" : "This IE shall be included according to the requirements in clause23 of 3GPPTS23.00724."})
View file
open5gs_2.4.8.202206290002.tar.xz/lib/pfcp/support/cache/tlv-msg-52.py -> open5gs_2.4.8.202206300002.tar.xz/lib/pfcp/support/cache/tlv-msg-52.py
Changed
@@ -1,27 +1,27 @@ ies = ies.append({ "ie_type" : "F-SEID", "ie_value" : "CP F-SEID", "presence" : "C", "tlv_more" : "0", "comment" : "This IE shall be present if the CP function decides to change its F-SEID for the PFCP session. The UP function shall use the new CP F-SEID for subsequent PFCP Session related messages for this PFCP Session. See Note 2."}) -type_list"Remove PDR""max_tlv_more" = "7" -ies.append({ "ie_type" : "Remove PDR", "ie_value" : "Remove PDR", "presence" : "C", "tlv_more" : "7", "comment" : "When present, this IE shall contain the PDR Rule which is requested to be removed. See Table 7.5.4-6-1.Several IEs within the same IE type may be present to represent a list of PDRs to remove."}) -type_list"Remove FAR""max_tlv_more" = "7" -ies.append({ "ie_type" : "Remove FAR", "ie_value" : "Remove FAR", "presence" : "C", "tlv_more" : "7", "comment" : "When present, this IE shall contain the FAR Rule which is requested to be removed. See Table 7.5.4-7-1.Several IEs within the same IE type may be present to represent a list of FARs to remove."}) -type_list"Remove URR""max_tlv_more" = "1" -ies.append({ "ie_type" : "Remove URR", "ie_value" : "Remove URR", "presence" : "C", "tlv_more" : "1", "comment" : "When present, this shall contain the URR Rule which is requested to be removed. See Table 7.5.4-8-1.Several IEs within the same IE type may be present to represent a list of URRs to remove."}) +type_list"Remove PDR""max_tlv_more" = "15" +ies.append({ "ie_type" : "Remove PDR", "ie_value" : "Remove PDR", "presence" : "C", "tlv_more" : "15", "comment" : "When present, this IE shall contain the PDR Rule which is requested to be removed. See Table 7.5.4-6-1.Several IEs within the same IE type may be present to represent a list of PDRs to remove."}) +type_list"Remove FAR""max_tlv_more" = "15" +ies.append({ "ie_type" : "Remove FAR", "ie_value" : "Remove FAR", "presence" : "C", "tlv_more" : "15", "comment" : "When present, this IE shall contain the FAR Rule which is requested to be removed. See Table 7.5.4-7-1.Several IEs within the same IE type may be present to represent a list of FARs to remove."}) +type_list"Remove URR""max_tlv_more" = "15" +ies.append({ "ie_type" : "Remove URR", "ie_value" : "Remove URR", "presence" : "C", "tlv_more" : "15", "comment" : "When present, this shall contain the URR Rule which is requested to be removed. See Table 7.5.4-8-1.Several IEs within the same IE type may be present to represent a list of URRs to remove."}) type_list"Remove QER""max_tlv_more" = "3" ies.append({ "ie_type" : "Remove QER", "ie_value" : "Remove QER", "presence" : "C", "tlv_more" : "3", "comment" : "When present, this IE shall contain the QER Rule which is requested to be removed. See Table 7.5.4-9-1.Several IEs within the same IE type may be present to represent a list of QERs to remove."}) ies.append({ "ie_type" : "Remove BAR", "ie_value" : "Remove BAR", "presence" : "C", "tlv_more" : "0", "comment" : "When present, this IE shall contain the BAR Rule which is requested to be removed. See Table 7.5.4.12-1."}) ies.append({ "ie_type" : "Remove Traffic Endpoint", "ie_value" : "Remove Traffic Endpoint", "presence" : "C", "tlv_more" : "0", "comment" : "When present, this IE shall contain the Traffic Endpoint ID identifying the traffic endpoint to be removed, if the UP function has indicated support of PDI optimization.All the PDRs that refer to the removed Traffic Endpoint shall be deleted.See Table 7.5.4.14-1."}) -ies.append({ "ie_type" : "Create PDR", "ie_value" : "Create PDR", "presence" : "C", "tlv_more" : "7", "comment" : "This IE shall be present if the CP function requests the UP function to create a new PDR.See Table 7.5.2.2-1.Several IEs within the same IE type may be present to represent a list of PDRs to create."}) -ies.append({ "ie_type" : "Create FAR", "ie_value" : "Create FAR", "presence" : "C", "tlv_more" : "7", "comment" : "This IE shall be present if the CP function requests the UP function to create a new FAR. See Table 7.5.2.3-1.Several IEs within the same IE type may be present to represent a list of FARs to create."}) -ies.append({ "ie_type" : "Create URR", "ie_value" : "Create URR", "presence" : "C", "tlv_more" : "1", "comment" : "This IE shall be present if the CP function requests the UP function to create a new URR. See Table 7.5.2.4-1.Several IEs within the same IE type may be present to represent a list of URRs to create."}) +ies.append({ "ie_type" : "Create PDR", "ie_value" : "Create PDR", "presence" : "C", "tlv_more" : "15", "comment" : "This IE shall be present if the CP function requests the UP function to create a new PDR.See Table 7.5.2.2-1.Several IEs within the same IE type may be present to represent a list of PDRs to create."}) +ies.append({ "ie_type" : "Create FAR", "ie_value" : "Create FAR", "presence" : "C", "tlv_more" : "15", "comment" : "This IE shall be present if the CP function requests the UP function to create a new FAR. See Table 7.5.2.3-1.Several IEs within the same IE type may be present to represent a list of FARs to create."}) +ies.append({ "ie_type" : "Create URR", "ie_value" : "Create URR", "presence" : "C", "tlv_more" : "15", "comment" : "This IE shall be present if the CP function requests the UP function to create a new URR. See Table 7.5.2.4-1.Several IEs within the same IE type may be present to represent a list of URRs to create."}) ies.append({ "ie_type" : "Create QER", "ie_value" : "Create QER", "presence" : "C", "tlv_more" : "3", "comment" : "This IE shall be present if the CP function requests the UP function to create a new QER. See Table 7.5.2.5-1.Several IEs within the same IE type may be present to represent a list of QERs to create."}) ies.append({ "ie_type" : "Create BAR", "ie_value" : "Create BAR", "presence" : "C", "tlv_more" : "0", "comment" : "This IE shall be present if the CP function requests the UP function to create a new BAR.See Table 7.5.2.6-1."}) ies.append({ "ie_type" : "Create Traffic Endpoint", "ie_value" : "Create Traffic Endpoint", "presence" : "C", "tlv_more" : "0", "comment" : "When present this IE shall contain the information associated with the Traffic Endpoint to be created, if the UP function has indicated support of PDI optimization. See Table 7.5.2.7-1."}) -type_list"Update PDR""max_tlv_more" = "7" -ies.append({ "ie_type" : "Update PDR", "ie_value" : "Update PDR", "presence" : "C", "tlv_more" : "7", "comment" : "This IE shall be present if a PDR previously created for the PFCP session need to be modified. See Table 7.5.4.2-1.Several IEs within the same IE type may be present to represent a list of PDRs to update."}) -type_list"Update FAR""max_tlv_more" = "7" -ies.append({ "ie_type" : "Update FAR", "ie_value" : "Update FAR", "presence" : "C", "tlv_more" : "7", "comment" : "This IE shall be present if a FAR previously created for the PFCP session need to be modified. See Table 7.5.4.3-1. Several IEs within the same IE type may be present to represent a list of FARs to update."}) -type_list"Update URR""max_tlv_more" = "1" -ies.append({ "ie_type" : "Update URR", "ie_value" : "Update URR", "presence" : "C", "tlv_more" : "1", "comment" : "This IE shall be present if URR(s) previously created for the PFCP session need to be modified.Several IEs within the same IE type may be present to represent a list of modified URRs. Previously URRs that are not modified shall not be included. See Table 7.5.4.4-1."}) +type_list"Update PDR""max_tlv_more" = "15" +ies.append({ "ie_type" : "Update PDR", "ie_value" : "Update PDR", "presence" : "C", "tlv_more" : "15", "comment" : "This IE shall be present if a PDR previously created for the PFCP session need to be modified. See Table 7.5.4.2-1.Several IEs within the same IE type may be present to represent a list of PDRs to update."}) +type_list"Update FAR""max_tlv_more" = "15" +ies.append({ "ie_type" : "Update FAR", "ie_value" : "Update FAR", "presence" : "C", "tlv_more" : "15", "comment" : "This IE shall be present if a FAR previously created for the PFCP session need to be modified. See Table 7.5.4.3-1. Several IEs within the same IE type may be present to represent a list of FARs to update."}) +type_list"Update URR""max_tlv_more" = "15" +ies.append({ "ie_type" : "Update URR", "ie_value" : "Update URR", "presence" : "C", "tlv_more" : "15", "comment" : "This IE shall be present if URR(s) previously created for the PFCP session need to be modified.Several IEs within the same IE type may be present to represent a list of modified URRs. Previously URRs that are not modified shall not be included. See Table 7.5.4.4-1."}) type_list"Update QER""max_tlv_more" = "3" ies.append({ "ie_type" : "Update QER", "ie_value" : "Update QER", "presence" : "C", "tlv_more" : "3", "comment" : "This IE shall be present if QER(s) previously created for the PFCP session need to be modified.Several IEs within the same IE type may be present to represent a list of modified QERs.Previously created QERs that are not modified shall not be included.See Table 7.5.4.5-1."}) ies.append({ "ie_type" : "Update BAR Session Modification Request", "ie_value" : "Update BAR", "presence" : "C", "tlv_more" : "0", "comment" : "This IE shall be present if a BAR previously created for the PFCP session needs to be modified.A previously created BAR that is not modified shall not be included.See Table 7.5.4.11-1."})
View file
open5gs_2.4.8.202206290002.tar.xz/lib/pfcp/support/cache/tlv-msg-53.py -> open5gs_2.4.8.202206300002.tar.xz/lib/pfcp/support/cache/tlv-msg-53.py
Changed
@@ -1,7 +1,7 @@ ies = ies.append({ "ie_type" : "Cause", "ie_value" : "Cause", "presence" : "M", "tlv_more" : "0", "comment" : "This IE shall indicate the acceptance or the rejection of the corresponding request message."}) ies.append({ "ie_type" : "Offending IE", "ie_value" : "Offending IE", "presence" : "C", "tlv_more" : "0", "comment" : "This IE shall be included if the rejection is due to a conditional or mandatory IE missing or faulty."}) -ies.append({ "ie_type" : "Created PDR", "ie_value" : "Created PDR", "presence" : "C", "tlv_more" : "7", "comment" : "This IE shall be present if the cause is set to success, new PDR(s) were requested to be created and the UP function was requested to allocate the local F-TEID or a UE IP address/prefix for the PDR(s).When present, this IE shall contain the PDR information associated to the PFCP session.See Table 7.5.3.2-1."}) +ies.append({ "ie_type" : "Created PDR", "ie_value" : "Created PDR", "presence" : "C", "tlv_more" : "15", "comment" : "This IE shall be present if the cause is set to success, new PDR(s) were requested to be created and the UP function was requested to allocate the local F-TEID or a UE IP address/prefix for the PDR(s).When present, this IE shall contain the PDR information associated to the PFCP session.See Table 7.5.3.2-1."}) ies.append({ "ie_type" : "Load Control Information", "ie_value" : "Load Control Information", "presence" : "O", "tlv_more" : "0", "comment" : "The UP function may include this IE if it supports the load control feature and the feature is activated in the network.See Table 7.5.3.3-1."}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "Overload Control Information", "presence" : "O", "tlv_more" : "0", "comment" : "During an overload condition, the UP function may include this IE if it supports the overload control feature and the feature is activated in the network."}) type_list"Usage Report Session Modification Response""max_tlv_more" = "7"
View file
open5gs_2.4.8.202206290002.tar.xz/lib/pfcp/support/pfcp-tlv.py -> open5gs_2.4.8.202206300002.tar.xz/lib/pfcp/support/pfcp-tlv.py
Changed
@@ -160,11 +160,11 @@ tlv_more = "0" # PFCP has no tlv_more if ie_type == 'Create PDR' or ie_type == 'Created PDR' or ie_type == 'Update PDR' or ie_type == "Remove PDR": - tlv_more = "7" + tlv_more = "15" if ie_type == 'Create FAR' or ie_type == 'Update FAR' or ie_type == "Remove FAR": - tlv_more = "7" + tlv_more = "15" if ie_type == 'Create URR' or ie_type == 'Update URR' or ie_type == "Remove URR": - tlv_more = "1" + tlv_more = "15" if ie_type == 'Create QER' or ie_type == 'Update QER' or ie_type == "Remove QER": tlv_more = "3" if ie_type == 'User Plane IP Resource Information':
View file
open5gs_2.4.8.202206290002.tar.xz/src/sgwc/gtp-path.c -> open5gs_2.4.8.202206300002.tar.xz/src/sgwc/gtp-path.c
Changed
@@ -27,6 +27,7 @@ ogs_pkbuf_t *pkbuf = NULL; ogs_sockaddr_t from; ogs_gtp_node_t *gnode = NULL; + char frombufOGS_ADDRSTRLEN; ogs_assert(fd != INVALID_SOCKET); @@ -83,7 +84,12 @@ gnode = ogs_gtp_node_find_by_addr(&sgwc_self()->mme_s11_list, &from); if (!gnode) { gnode = ogs_gtp_node_add_by_addr(&sgwc_self()->mme_s11_list, &from); - ogs_assert(gnode); + if (!gnode) { + ogs_error("Failed to create new gnode(%s:%u), mempool full, ignoring msg!", + OGS_ADDR(&from, frombuf), OGS_PORT(&from)); + ogs_pkbuf_free(pkbuf); + return; + } gnode->sock = data; } ogs_assert(e);
View file
open5gs_2.4.8.202206290002.tar.xz/src/upf/n4-handler.c -> open5gs_2.4.8.202206300002.tar.xz/src/upf/n4-handler.c
Changed
@@ -467,11 +467,7 @@ OGS_PFCP_CAUSE_SESSION_CONTEXT_NOT_FOUND, 0); return; } - - ogs_assert(sess); - upf_pfcp_send_session_deletion_response(xact, sess); - upf_sess_remove(sess); }
View file
open5gs_2.4.8.202206290002.tar.xz/tests/core/tlv-test.c -> open5gs_2.4.8.202206300002.tar.xz/tests/core/tlv-test.c
Changed
@@ -635,54 +635,53 @@ return; } -#if 0 /* Sample header for tlv_msg */ #define TLV_AUTHORIZATION_POLICY_SUPPORT_TYPE 21 #define TLV_AUTHORIZATION_POLICY_SUPPORT_LEN 1 -typedef tlv_uint8_t tlv_authorization_policy_support_t; -extern tlv_desc_t tlv_desc_authorization_policy_support; +typedef ogs_tlv_uint8_t tlv_authorization_policy_support_t; +extern ogs_tlv_desc_t tlv_desc_authorization_policy_support; #define TLV_CLIENT_SECURITY_HISTORY_TYPE 108 -#define TLV_CLIENT_SECURITY_HISTORY_LEN TLV_VARIABLE_LEN +#define TLV_CLIENT_SECURITY_HISTORY_LEN OGS_TLV_VARIABLE_LEN typedef struct _tlv_client_security_history_t { - tlv_presence_t presence; + ogs_tlv_presence_t presence; tlv_authorization_policy_support_t authorization_policy_support0; tlv_authorization_policy_support_t authorization_policy_support2; } tlv_client_security_history_t; -extern tlv_desc_t tlv_desc_client_security_history; +extern ogs_tlv_desc_t tlv_desc_client_security_history; #define TLV_CLIENT_INFO_TYPE 103 -#define TLV_CLIENT_INFO_LEN TLV_VARIABLE_LEN +#define TLV_CLIENT_INFO_LEN OGS_TLV_VARIABLE_LEN typedef struct _tlv_client_info_t { - tlv_presence_t presence; + ogs_tlv_presence_t presence; tlv_client_security_history_t client_security_history; } tlv_client_info_t; -extern tlv_desc_t tlv_desc_client_info; +extern ogs_tlv_desc_t tlv_desc_client_info; #define TLV_SERVER_NAME_TYPE 25 -#define TLV_SERVER_NAME_LEN TLV_VARIABLE_LEN -typedef tlv_octet_t tlv_server_name_t; -extern tlv_desc_t tlv_desc_server_name; +#define TLV_SERVER_NAME_LEN OGS_TLV_VARIABLE_LEN +typedef ogs_tlv_octet_t tlv_server_name_t; +extern ogs_tlv_desc_t tlv_desc_server_name; #define TLV_SERVER_INFO_TYPE 26 -#define TLV_SERVER_INFO_LEN TLV_VARIABLE_LEN +#define TLV_SERVER_INFO_LEN OGS_TLV_VARIABLE_LEN typedef struct _tlv_server_info_t { - tlv_presence_t presence; - tlv_server_name_t TLV_1_OR_MORE(server_name); + ogs_tlv_presence_t presence; + tlv_server_name_t OGS_TLV_1_OR_MORE(server_name); } tlv_server_info_t; -extern tlv_desc_t tlv_desc_server_info; +extern ogs_tlv_desc_t tlv_desc_server_info; typedef struct _tlv_attach_req { tlv_client_info_t client_info; tlv_server_info_t server_info; } tlv_attach_req; -extern tlv_desc_t tlv_desc_attach_req; +extern ogs_tlv_desc_t tlv_desc_attach_req; /* Sample source for tlv_msg */ -tlv_desc_t tlv_desc_authorization_policy_support0 = +ogs_tlv_desc_t tlv_desc_authorization_policy_support0 = { - TLV_UINT8, + OGS_TLV_UINT8, "Auth Policy0", TLV_AUTHORIZATION_POLICY_SUPPORT_TYPE, TLV_AUTHORIZATION_POLICY_SUPPORT_LEN, @@ -690,9 +689,9 @@ sizeof(tlv_authorization_policy_support_t), { NULL } }; -tlv_desc_t tlv_desc_authorization_policy_support2 = +ogs_tlv_desc_t tlv_desc_authorization_policy_support2 = { - TLV_UINT8, + OGS_TLV_UINT8, "Auth Policy2", TLV_AUTHORIZATION_POLICY_SUPPORT_TYPE, TLV_AUTHORIZATION_POLICY_SUPPORT_LEN, @@ -701,9 +700,9 @@ { NULL } }; -tlv_desc_t tlv_desc_client_security_history = +ogs_tlv_desc_t tlv_desc_client_security_history = { - TLV_COMPOUND, + OGS_TLV_COMPOUND, "Sec History", TLV_CLIENT_SECURITY_HISTORY_TYPE, TLV_CLIENT_SECURITY_HISTORY_LEN, @@ -716,9 +715,9 @@ } }; -tlv_desc_t tlv_desc_client_info = +ogs_tlv_desc_t tlv_desc_client_info = { - TLV_COMPOUND, + OGS_TLV_COMPOUND, "Client Info", TLV_CLIENT_INFO_TYPE, TLV_CLIENT_INFO_LEN, @@ -730,9 +729,9 @@ } }; -tlv_desc_t tlv_desc_server_name = +ogs_tlv_desc_t tlv_desc_server_name = { - TLV_VAR_STR, + OGS_TLV_VAR_STR, "Server Name", TLV_SERVER_NAME_TYPE, TLV_SERVER_NAME_LEN, @@ -741,22 +740,22 @@ { NULL } }; -tlv_desc_t tlv_desc_server_info = +ogs_tlv_desc_t tlv_desc_server_info = { - TLV_COMPOUND, + OGS_TLV_COMPOUND, "Server Info", TLV_SERVER_INFO_TYPE, TLV_SERVER_INFO_LEN, 0, sizeof(tlv_server_info_t), { - &tlv_desc_server_name, &tlv_desc_more2, + &tlv_desc_server_name, &ogs_tlv_desc_more16, NULL, } }; -tlv_desc_t tlv_desc_attach_req = { - TLV_MESSAGE, "Attach Req", 0, 0, 0, 0, { +ogs_tlv_desc_t tlv_desc_attach_req = { + OGS_TLV_MESSAGE, "Attach Req", 0, 0, 0, 0, { &tlv_desc_client_info, &tlv_desc_server_info, NULL, @@ -767,9 +766,11 @@ tlv_attach_req reqv; tlv_attach_req reqv2; - pkbuf_t *req = NULL; + ogs_pkbuf_t *req = NULL; char testbuf1024; + int i; + /* Initialize message value structure */ memset(&reqv, 0, sizeof(tlv_attach_req)); @@ -786,34 +787,44 @@ authorization_policy_support2.u8 = 0x9; reqv.server_info.presence = 1; - reqv.server_info.server_name0.presence = 1; - reqv.server_info.server_name0.data = - (uint8_t*)"\x11\x22\x33\x44\x55\x66"; - reqv.server_info.server_name0.len = 6; - - reqv.server_info.presence = 1; - reqv.server_info.server_name1.presence = 1; - reqv.server_info.server_name1.data = - (uint8_t*)"\xaa\xbb\xcc\xdd\xee\xff"; - reqv.server_info.server_name1.len = 6; + for (i = 0; i < 16; i++) { + reqv.server_info.server_namei.presence = 1; + reqv.server_info.server_namei.data = + (uint8_t*)"\x11\x22\x33\x44\x55\x66"; + reqv.server_info.server_namei.len = 6; + + req = ogs_tlv_build_msg( + &tlv_desc_attach_req, &reqv, OGS_TLV_MODE_T1_L2_I1); + ABTS_INT_EQUAL(tc, 32+i*10, req->len); + ogs_pkbuf_free(req); + } /* Build message */ - tlv_build_msg(&req, &tlv_desc_attach_req, &reqv, OGS_TLV_MODE_T1_L2_I1); + req = ogs_tlv_build_msg(&tlv_desc_attach_req, &reqv, OGS_TLV_MODE_T1_L2_I1); #define TEST_TLV_BUILD_MSG \ "67000e00 6c000a00 15000100 03150001" \ - "02091a00 14001900 06001122 33445566" \ - "19000600 aabbccdd eeff" - - ABTS_INT_EQUAL(tc, 42, req->len); - ABTS_TRUE(tc, memcmp(req->payload, - CORE_HEX(TEST_TLV_BUILD_MSG, strlen(TEST_TLV_BUILD_MSG), testbuf), + "02091a00 a0001900 06001122 33445566" \ + "19000600 11223344 55661900 06001122" \ + "33445566 19000600 11223344 55661900" \ + "06001122 33445566 19000600 11223344" \ + "55661900 06001122 33445566 19000600" \ + "11223344 55661900 06001122 33445566" \ + "19000600 11223344 55661900 06001122" \ + "33445566 19000600 11223344 55661900" \ + "06001122 33445566 19000600 11223344" \ + "55661900 06001122 33445566 19000600" \ + "11223344 5566" + + ABTS_INT_EQUAL(tc, 182, req->len); + ABTS_TRUE(tc, memcmp(req->data, + OGS_HEX(TEST_TLV_BUILD_MSG, strlen(TEST_TLV_BUILD_MSG), testbuf), req->len) == 0); /* Initialize message value structure */ memset(&reqv2, 0, sizeof(tlv_attach_req)); /* Parse message */ - tlv_parse_msg(&reqv2, &tlv_desc_attach_req, req, + ogs_tlv_parse_msg(&reqv2, &tlv_desc_attach_req, req, OGS_TLV_MODE_T1_L2_I1); ABTS_INT_EQUAL(tc, 1, reqv2.client_info.presence); @@ -830,19 +841,16 @@ ABTS_INT_EQUAL(tc, 0x9, reqv2.client_info. client_security_history.authorization_policy_support2.u8); - ABTS_INT_EQUAL(tc, 1, reqv2.server_info.presence); - ABTS_INT_EQUAL(tc, 1, reqv2.server_info.server_name0.presence); - ABTS_INT_EQUAL(tc, 1, reqv2.server_info.server_name1.presence); - ABTS_INT_EQUAL(tc, 6, reqv2.server_info.server_name0.len); - ABTS_TRUE(tc, memcmp(reqv2.server_info.server_name0.data, - (uint8_t*)"\x11\x22\x33\x44\x55\x66", 6) == 0); - ABTS_INT_EQUAL(tc, 6, reqv2.server_info.server_name1.len); - ABTS_TRUE(tc, memcmp(reqv2.server_info.server_name1.data, - (uint8_t*)"\xaa\xbb\xcc\xdd\xee\xff", 6) == 0); + for (i = 0; i < 16; i++) { + ABTS_INT_EQUAL(tc, 1, reqv2.server_info.presence); + ABTS_INT_EQUAL(tc, 1, reqv2.server_info.server_namei.presence); + ABTS_INT_EQUAL(tc, 6, reqv2.server_info.server_namei.len); + ABTS_TRUE(tc, memcmp(reqv2.server_info.server_namei.data, + (uint8_t*)"\x11\x22\x33\x44\x55\x66", 6) == 0); + } - pkbuf_free(req); + ogs_pkbuf_free(req); } -#endif abts_suite *test_tlv(abts_suite *suite) { @@ -866,9 +874,7 @@ abts_run_test(suite, test4_func, (void*)OGS_TLV_MODE_T1_L2_I1); abts_run_test(suite, test5_func, (void*)OGS_TLV_MODE_T1_L2_I1); -#if 0 abts_run_test(suite, test6_func, NULL); -#endif return suite; }
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
.