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 6
View file
open5gs_2.4.8.202206300002.dsc -> open5gs_2.4.8.202207010002.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.202206300002 +Version: 2.4.8.202207010002 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: - 70a011ee684d644a03b3eb5f70f9431c117c5744 11444120 open5gs_2.4.8.202206300002.tar.xz + fc5dd83e6e1531f4819b9b29515e9a95b6679fd5 11444060 open5gs_2.4.8.202207010002.tar.xz Checksums-Sha256: - ab387b7f01f43118ca0e224189627812f200a7050b327b706f553fde05edb37c 11444120 open5gs_2.4.8.202206300002.tar.xz + 52963ee9bf7ce27f5fe1de65b86b152cdcc0ff54d6811302976f0cffa73e2d01 11444060 open5gs_2.4.8.202207010002.tar.xz Files: - 7447ec56414ce907330f78528419f548 11444120 open5gs_2.4.8.202206300002.tar.xz + 00282b87d56da28014e0d41348c65f67 11444060 open5gs_2.4.8.202207010002.tar.xz
View file
open5gs_2.4.8.202206300002.tar.xz/debian/changelog -> open5gs_2.4.8.202207010002.tar.xz/debian/changelog
Changed
@@ -1,8 +1,8 @@ -open5gs (2.4.8.202206300002) UNRELEASED; urgency=medium +open5gs (2.4.8.202207010002) UNRELEASED; urgency=medium * Snapshot build - -- Sukchan Lee <acetcom@gmail.com> Thu, 30 Jun 2022 00:09:09 +0000 + -- Sukchan Lee <acetcom@gmail.com> Fri, 01 Jul 2022 00:09:11 +0000 open5gs (2.4.8) unstable; urgency=medium
View file
open5gs_2.4.8.202206300002.tar.xz/debian/control -> open5gs_2.4.8.202207010002.tar.xz/debian/control
Changed
@@ -31,7 +31,7 @@ Package: open5gs-common Architecture: any Multi-Arch: same -Depends: osmocom-nightly (= 1.0.0.202206300002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202207010002), ${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.202206300002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202207010002), ${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.202206300002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202207010002), ${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.202206300002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202207010002), ${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.202206300002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202207010002), ${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.202206300002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202207010002), ${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.202206300002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202207010002), ${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.202206300002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202207010002), ${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.202206300002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202207010002), ${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.202206300002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202207010002), ${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.202206300002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202207010002), ${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.202206300002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202207010002), ${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.202206300002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202207010002), ${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.202206300002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202207010002), ${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.202206300002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202207010002), ${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.202206300002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202207010002), ${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.202206300002), ${misc:Depends}, +Depends: osmocom-nightly (= 1.0.0.202207010002), ${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.202206300002), ${misc:Depends}, +Depends: osmocom-nightly (= 1.0.0.202207010002), ${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.202206300002.tar.xz/src/amf/context.c -> open5gs_2.4.8.202207010002.tar.xz/src/amf/context.c
Changed
@@ -2057,7 +2057,9 @@ ogs_assert(amf_ue); + ogs_assert(amf_ue->num_of_slice <= OGS_MAX_NUM_OF_SLICE); for (i = 0; i < amf_ue->num_of_slice; i++) { + ogs_assert(amf_ue->slicei.num_of_session <= OGS_MAX_NUM_OF_SESS); for (j = 0; j < amf_ue->slicei.num_of_session; j++) { ogs_assert(amf_ue->slicei.sessionj.name); ogs_free(amf_ue->slicei.sessionj.name);
View file
open5gs_2.4.8.202206300002.tar.xz/src/amf/gmm-handler.c -> open5gs_2.4.8.202207010002.tar.xz/src/amf/gmm-handler.c
Changed
@@ -1000,6 +1000,11 @@ for (i = 0; i < amf_ue->num_of_slice; i++) { + if (i >= OGS_MAX_NUM_OF_SLICE) { + ogs_warn("Ignore max slice count overflow %d>=%d", + amf_ue->num_of_slice, OGS_MAX_NUM_OF_SLICE); + break; + } if (ul_nas_transport->presencemask & OGS_NAS_5GS_UL_NAS_TRANSPORT_S_NSSAI_PRESENT) { ogs_nas_s_nssai_ie_t ie; @@ -1015,6 +1020,12 @@ } } for (j = 0; j < amf_ue->allowed_nssai.num_of_s_nssai; j++) { + if (j >= OGS_MAX_NUM_OF_SLICE) { + ogs_warn("Ignore max slice count overflow %d>=%d", + amf_ue->allowed_nssai.num_of_s_nssai, + OGS_MAX_NUM_OF_SLICE); + break; + } if (amf_ue->slicei.s_nssai.sst == amf_ue->allowed_nssai.s_nssaij.sst && amf_ue->slicei.s_nssai.sd.v == @@ -1025,6 +1036,13 @@ for (k = 0; k < amf_ue->slicei.num_of_session; k++) { + if (k >= OGS_MAX_NUM_OF_SESS) { + ogs_warn("Ignore max session " + "count overflow %d>=%d", + amf_ue->slicei.num_of_session, + OGS_MAX_NUM_OF_SESS); + break; + } if (!strcmp(dnn->value, amf_ue->slicei.sessionk.name)) {
View file
open5gs_2.4.8.202206300002.tar.xz/src/hss/hss-s6a-path.c -> open5gs_2.4.8.202207010002.tar.xz/src/hss/hss-s6a-path.c
Changed
@@ -566,7 +566,15 @@ struct avp *pdn_gw_allocation_type; struct avp *vplmn_dynamic_address_allowed; - ogs_session_t *session = &slice_data->sessioni; + ogs_session_t *session = NULL; + + if (i >= OGS_MAX_NUM_OF_SESS) { + ogs_warn("Ignore max session count overflow %d>=%d", + slice_data->num_of_session, OGS_MAX_NUM_OF_SESS); + break; + } + + session = &slice_data->sessioni; ogs_assert(session); session->context_identifier = i+1;
View file
open5gs_2.4.8.202206300002.tar.xz/src/hss/hss-swx-path.c -> open5gs_2.4.8.202207010002.tar.xz/src/hss/hss-swx-path.c
Changed
@@ -592,7 +592,15 @@ struct avp *pdn_gw_allocation_type; struct avp *vplmn_dynamic_address_allowed; - ogs_session_t *session = &slice_data->sessioni; + ogs_session_t *session = NULL; + + if (i >= OGS_MAX_NUM_OF_SESS) { + ogs_warn("Ignore max session count overflow %d>=%d", + slice_data->num_of_session, OGS_MAX_NUM_OF_SESS); + break; + } + + session = &slice_data->sessioni; ogs_assert(session); session->context_identifier = i+1;
View file
open5gs_2.4.8.202206300002.tar.xz/src/mme/mme-context.c -> open5gs_2.4.8.202207010002.tar.xz/src/mme/mme-context.c
Changed
@@ -3281,6 +3281,7 @@ ogs_assert(mme_ue); + ogs_assert(mme_ue->num_of_session <= OGS_MAX_NUM_OF_SESS); for (i = 0; i < mme_ue->num_of_session; i++) { if (mme_ue->sessioni.name) ogs_free(mme_ue->sessioni.name); @@ -3297,6 +3298,7 @@ ogs_assert(mme_ue); ogs_assert(apn); + ogs_assert(mme_ue->num_of_session <= OGS_MAX_NUM_OF_SESS); for (i = 0; i < mme_ue->num_of_session; i++) { session = &mme_ue->sessioni; ogs_assert(session->name); @@ -3314,6 +3316,7 @@ ogs_assert(mme_ue); + ogs_assert(mme_ue->num_of_session <= OGS_MAX_NUM_OF_SESS); for (i = 0; i < mme_ue->num_of_session; i++) { session = &mme_ue->sessioni; if (session->context_identifier == mme_ue->context_identifier)
View file
open5gs_2.4.8.202206300002.tar.xz/src/mme/mme-fd-path.c -> open5gs_2.4.8.202207010002.tar.xz/src/mme/mme-fd-path.c
Changed
@@ -913,8 +913,14 @@ */ case OGS_DIAM_S6A_AVP_CODE_APN_CONFIGURATION: { - ogs_session_t *session = - &slice_data->sessionslice_data->num_of_session; + ogs_session_t *session = NULL; + + if (slice_data->num_of_session >= OGS_MAX_NUM_OF_SESS) { + ogs_warn("Ignore max session count overflow %d>=%d", + slice_data->num_of_session, OGS_MAX_NUM_OF_SESS); + break; + } + session = &slice_data->sessionslice_data->num_of_session; ogs_assert(session); /* AVP: 'Service-Selection'(493)
View file
open5gs_2.4.8.202206300002.tar.xz/src/mme/mme-s11-handler.c -> open5gs_2.4.8.202207010002.tar.xz/src/mme/mme-s11-handler.c
Changed
@@ -78,7 +78,7 @@ } void mme_s11_handle_create_session_response( - ogs_gtp_xact_t *xact, mme_ue_t *mme_ue, + ogs_gtp_xact_t *xact, mme_ue_t *mme_ue_from_teid, ogs_gtp2_create_session_response_t *rsp) { int rv, i; @@ -91,6 +91,7 @@ mme_bearer_t *bearer = NULL; mme_sess_t *sess = NULL; + mme_ue_t *mme_ue = NULL; sgw_ue_t *source_ue = NULL, *target_ue = NULL; ogs_session_t *session = NULL; ogs_gtp2_bearer_qos_t bearer_qos; @@ -98,7 +99,6 @@ uint16_t decoded = 0; int create_action = 0; - ogs_assert(mme_ue); ogs_assert(rsp); ogs_debug("Create Session Response"); @@ -110,6 +110,8 @@ create_action = xact->create_action; sess = xact->data; ogs_assert(sess); + mme_ue = sess->mme_ue; + ogs_assert(mme_ue); source_ue = sgw_ue_cycle(mme_ue->sgw_ue); ogs_assert(source_ue); @@ -129,6 +131,11 @@ ************************/ cause_value = OGS_GTP2_CAUSE_REQUEST_ACCEPTED; + if (!mme_ue_from_teid) { + ogs_error("No Context in TEID"); + cause_value = OGS_GTP2_CAUSE_CONTEXT_NOT_FOUND; + } + if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) { if (create_action == OGS_GTP_CREATE_IN_ATTACH_REQUEST) { ogs_error("%s Attach reject", mme_ue->imsi_bcd); @@ -393,7 +400,7 @@ } void mme_s11_handle_modify_bearer_response( - ogs_gtp_xact_t *xact, mme_ue_t *mme_ue, + ogs_gtp_xact_t *xact, mme_ue_t *mme_ue_from_teid, ogs_gtp2_modify_bearer_response_t *rsp) { int rv; @@ -401,9 +408,9 @@ int modify_action = 0; ogs_gtp2_cause_t *cause = NULL; + mme_ue_t *mme_ue = NULL; sgw_ue_t *sgw_ue = NULL; - ogs_assert(mme_ue); ogs_assert(rsp); ogs_debug("Modify Bearer Response"); @@ -413,6 +420,8 @@ ********************/ ogs_assert(xact); modify_action = xact->modify_action; + mme_ue = xact->data; + ogs_assert(mme_ue); sgw_ue = sgw_ue_cycle(mme_ue->sgw_ue); ogs_assert(sgw_ue); @@ -424,6 +433,11 @@ ************************/ cause_value = OGS_GTP2_CAUSE_REQUEST_ACCEPTED; + if (!mme_ue_from_teid) { + ogs_error("No Context in TEID"); + cause_value = OGS_GTP2_CAUSE_CONTEXT_NOT_FOUND; + } + if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) { mme_send_delete_session_or_mme_ue_context_release(mme_ue); return; @@ -480,7 +494,7 @@ } void mme_s11_handle_delete_session_response( - ogs_gtp_xact_t *xact, mme_ue_t *mme_ue, + ogs_gtp_xact_t *xact, mme_ue_t *mme_ue_from_teid, ogs_gtp2_delete_session_response_t *rsp) { int rv; @@ -488,8 +502,8 @@ int action = 0; sgw_ue_t *source_ue = NULL, *target_ue = NULL; mme_sess_t *sess = NULL; + mme_ue_t *mme_ue = NULL; - ogs_assert(mme_ue); ogs_assert(rsp); ogs_debug("Delete Session Response"); @@ -502,6 +516,8 @@ ogs_assert(action); sess = xact->data; ogs_assert(sess); + mme_ue = sess->mme_ue; + ogs_assert(mme_ue); target_ue = sgw_ue_cycle(mme_ue->sgw_ue); ogs_assert(target_ue); @@ -516,6 +532,13 @@ rv = ogs_gtp_xact_commit(xact); ogs_expect_or_return(rv == OGS_OK); + /************************ + * Check MME-UE Context + ************************/ + if (!mme_ue_from_teid) { + ogs_error("No Context in TEID"); + } + /******************** * Check Cause Value ********************/ @@ -1053,7 +1076,7 @@ } void mme_s11_handle_release_access_bearers_response( - ogs_gtp_xact_t *xact, mme_ue_t *mme_ue, + ogs_gtp_xact_t *xact, mme_ue_t *mme_ue_from_teid, ogs_gtp2_release_access_bearers_response_t *rsp) { int rv; @@ -1062,10 +1085,10 @@ enb_ue_t *enb_ue = NULL; sgw_ue_t *sgw_ue = NULL;; + mme_ue_t *mme_ue = NULL; mme_sess_t *sess = NULL; mme_bearer_t *bearer = NULL; - ogs_assert(mme_ue); ogs_assert(rsp); ogs_debug("Release Access Bearers Response"); @@ -1076,12 +1099,21 @@ ogs_assert(xact); action = xact->release_action; ogs_assert(action); + mme_ue = xact->data; + ogs_assert(mme_ue); sgw_ue = sgw_ue_cycle(mme_ue->sgw_ue); ogs_assert(sgw_ue); rv = ogs_gtp_xact_commit(xact); ogs_expect_or_return(rv == OGS_OK); + /*********************** + * Check MME-UE Context + ***********************/ + if (!mme_ue_from_teid) { + ogs_error("No Context in TEID ACTION:%d", action); + } + /******************** * Check Cause Value ********************/ @@ -1091,7 +1123,7 @@ cause_value = cause->value; if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) - ogs_error("GTP Failed CAUSE:%d", cause_value); + ogs_error("GTP Failed CAUSE:%d, ACTION:%d", cause_value, action); } /******************** @@ -1333,7 +1365,7 @@ } void mme_s11_handle_create_indirect_data_forwarding_tunnel_response( - ogs_gtp_xact_t *xact, mme_ue_t *mme_ue, + ogs_gtp_xact_t *xact, mme_ue_t *mme_ue_from_teid, ogs_gtp2_create_indirect_data_forwarding_tunnel_response_t *rsp) { int rv; @@ -1341,12 +1373,12 @@ ogs_gtp2_cause_t *cause = NULL; sgw_ue_t *sgw_ue = NULL; mme_bearer_t *bearer = NULL; + mme_ue_t *mme_ue = NULL; enb_ue_t *source_ue = NULL; int i; ogs_gtp2_f_teid_t *teid = NULL;
View file
open5gs_2.4.8.202206300002.tar.xz/src/mme/mme-s6a-handler.c -> open5gs_2.4.8.202207010002.tar.xz/src/mme/mme-s6a-handler.c
Changed
@@ -67,10 +67,13 @@ mme_session_remove_all(mme_ue); - mme_ue->num_of_session = slice_data->num_of_session; - mme_ue->context_identifier = slice_data->context_identifier; - for (i = 0; i < slice_data->num_of_session; i++) { + if (i >= OGS_MAX_NUM_OF_SESS) { + ogs_warn("Ignore max session count overflow %d>=%d", + slice_data->num_of_session, OGS_MAX_NUM_OF_SESS); + break; + } + mme_ue->sessioni.name = ogs_strdup(slice_data->sessioni.name); ogs_assert(mme_ue->sessioni.name); @@ -89,4 +92,7 @@ memcpy(&mme_ue->sessioni.smf_ip, &slice_data->sessioni.smf_ip, sizeof(mme_ue->sessioni.smf_ip)); } + + mme_ue->num_of_session = i; + mme_ue->context_identifier = slice_data->context_identifier; }
View file
open5gs_2.4.8.202206300002.tar.xz/src/sgwc/pfcp-path.c -> open5gs_2.4.8.202207010002.tar.xz/src/sgwc/pfcp-path.c
Changed
@@ -212,8 +212,6 @@ ogs_assert(sess); ogs_assert(xact); - xact->local_seid = sess->sgwc_sxa_seid; - memset(&h, 0, sizeof(ogs_pfcp_header_t)); h.type = OGS_PFCP_SESSION_MODIFICATION_REQUEST_TYPE; h.seid = sess->sgwu_sxa_seid; @@ -284,6 +282,7 @@ xact->gtpbuf = ogs_pkbuf_copy(gtpbuf); ogs_expect_or_return_val(xact->gtpbuf, OGS_ERROR); } + xact->local_seid = sess->sgwc_sxa_seid; ogs_list_for_each(&sess->bearer_list, bearer) ogs_list_add(&xact->bearer_to_modify_list, &bearer->to_modify_node); @@ -378,7 +377,6 @@ ogs_pfcp_header_t h; ogs_assert(xact); - xact->local_seid = sess->sgwc_sxa_seid; memset(&h, 0, sizeof(ogs_pfcp_header_t)); h.type = OGS_PFCP_SESSION_REPORT_RESPONSE_TYPE;
View file
open5gs_2.4.8.202206300002.tar.xz/src/sgwc/pfcp-sm.c -> open5gs_2.4.8.202207010002.tar.xz/src/sgwc/pfcp-sm.c
Changed
@@ -217,6 +217,7 @@ break; case OGS_PFCP_SESSION_ESTABLISHMENT_RESPONSE_TYPE: if (!message->h.seid_presence) ogs_error("No SEID"); + sgwc_sxa_handle_session_establishment_response( sess, xact, e->gtp_message, &message->pfcp_session_establishment_response); @@ -224,6 +225,7 @@ case OGS_PFCP_SESSION_MODIFICATION_RESPONSE_TYPE: if (!message->h.seid_presence) ogs_error("No SEID"); + sgwc_sxa_handle_session_modification_response( sess, xact, e->gtp_message, &message->pfcp_session_modification_response); @@ -231,6 +233,7 @@ case OGS_PFCP_SESSION_DELETION_RESPONSE_TYPE: if (!message->h.seid_presence) ogs_error("No SEID"); + sgwc_sxa_handle_session_deletion_response( sess, xact, e->gtp_message, &message->pfcp_session_deletion_response); @@ -238,6 +241,7 @@ case OGS_PFCP_SESSION_REPORT_REQUEST_TYPE: if (!message->h.seid_presence) ogs_error("No SEID"); + sgwc_sxa_handle_session_report_request( sess, xact, &message->pfcp_session_report_request); break;
View file
open5gs_2.4.8.202206300002.tar.xz/src/sgwc/s11-handler.c -> open5gs_2.4.8.202207010002.tar.xz/src/sgwc/s11-handler.c
Changed
@@ -480,6 +480,7 @@ current_xact->gtpbuf = ogs_pkbuf_copy(gtpbuf); ogs_assert(current_xact->gtpbuf); } + current_xact->local_seid = sess->sgwc_sxa_seid; ogs_list_add(&pfcp_xact_list, ¤t_xact->tmpnode); } @@ -688,7 +689,6 @@ ogs_gtp2_f_teid_t *sgw_s1u_teid = NULL, *enb_s1u_teid = NULL; ogs_gtp2_uli_t uli; - ogs_assert(sgwc_ue); ogs_assert(message); rsp = &message->create_bearer_response; ogs_assert(rsp); @@ -715,10 +715,30 @@ rv = ogs_gtp_xact_commit(s11_xact); ogs_expect(rv == OGS_OK); + /************************ + * Check SGWC-UE Context + ************************/ + cause_value = OGS_GTP2_CAUSE_REQUEST_ACCEPTED; + + if (!sgwc_ue) { + ogs_error("No Context in TEID"); + cause_value = OGS_GTP2_CAUSE_CONTEXT_NOT_FOUND; + } + + if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) { + ogs_assert(OGS_OK == + sgwc_pfcp_send_bearer_modification_request( + bearer, NULL, NULL, + OGS_PFCP_MODIFY_UL_ONLY|OGS_PFCP_MODIFY_REMOVE)); + ogs_gtp_send_error_message(s5c_xact, sess ? sess->pgw_s5c_teid : 0, + OGS_GTP2_CREATE_BEARER_RESPONSE_TYPE, cause_value); + return; + } + /***************************************** * Check Mandatory/Conditional IE Missing *****************************************/ - cause_value = OGS_GTP2_CAUSE_REQUEST_ACCEPTED; + ogs_assert(cause_value == OGS_GTP2_CAUSE_REQUEST_ACCEPTED); if (rsp->bearer_contexts.presence == 0) { ogs_error("No Bearer"); @@ -853,7 +873,6 @@ sgwc_bearer_t *bearer = NULL; ogs_gtp2_update_bearer_response_t *rsp = NULL; - ogs_assert(sgwc_ue); ogs_assert(message); rsp = &message->update_bearer_response; ogs_assert(rsp); @@ -880,10 +899,26 @@ rv = ogs_gtp_xact_commit(s11_xact); ogs_expect(rv == OGS_OK); + /************************ + * Check SGWC-UE Context + ************************/ + cause_value = OGS_GTP2_CAUSE_REQUEST_ACCEPTED; + + if (!sgwc_ue) { + ogs_error("No Context in TEID"); + cause_value = OGS_GTP2_CAUSE_CONTEXT_NOT_FOUND; + } + + if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) { + ogs_gtp_send_error_message(s5c_xact, sess ? sess->pgw_s5c_teid : 0, + OGS_GTP2_UPDATE_BEARER_RESPONSE_TYPE, cause_value); + return; + } + /***************************************** * Check Mandatory/Conditional IE Missing *****************************************/ - cause_value = OGS_GTP2_CAUSE_REQUEST_ACCEPTED; + ogs_assert(cause_value == OGS_GTP2_CAUSE_REQUEST_ACCEPTED); if (rsp->bearer_contexts.presence == 0) { ogs_error("No Bearer"); @@ -970,7 +1005,6 @@ sgwc_bearer_t *bearer = NULL; ogs_gtp2_delete_bearer_response_t *rsp = NULL; - ogs_assert(sgwc_ue); ogs_assert(message); rsp = &message->delete_bearer_response; ogs_assert(rsp); @@ -1002,6 +1036,11 @@ ************************/ cause_value = OGS_GTP2_CAUSE_REQUEST_ACCEPTED; + if (!sgwc_ue) { + ogs_error("No Context in TEID"); + cause_value = OGS_GTP2_CAUSE_CONTEXT_NOT_FOUND; + } + if (rsp->linked_eps_bearer_id.presence) { /* * << Linked EPS Bearer ID >> @@ -1073,8 +1112,10 @@ ogs_error("No Cause"); } - ogs_debug(" MME_S11_TEID%d SGW_S11_TEID%d", - sgwc_ue->mme_s11_teid, sgwc_ue->sgw_s11_teid); + if (sgwc_ue) { + ogs_debug(" MME_S11_TEID%d SGW_S11_TEID%d", + sgwc_ue->mme_s11_teid, sgwc_ue->sgw_s11_teid); + } ogs_debug(" SGW_S5C_TEID0x%x PGW_S5C_TEID0x%x", sess->sgw_s5c_teid, sess->pgw_s5c_teid); @@ -1473,7 +1514,6 @@ s5c_xact = ogs_gtp_xact_local_create( sess->gnode, &message->h, pkbuf, gtp_bearer_timeout, bearer); ogs_expect_or_return(s5c_xact); - s5c_xact->local_teid = sess->sgw_s5c_teid; ogs_gtp_xact_associate(s11_xact, s5c_xact);
View file
open5gs_2.4.8.202206300002.tar.xz/src/sgwc/s5c-handler.c -> open5gs_2.4.8.202207010002.tar.xz/src/sgwc/s5c-handler.c
Changed
@@ -79,9 +79,6 @@ ogs_gtp_xact_t *s11_xact = NULL; ogs_gtp_node_t *pgw = NULL; - ogs_assert(sess); - sgwc_ue = sess->sgwc_ue; - ogs_assert(sgwc_ue); ogs_assert(gtpbuf); ogs_assert(message); rsp = &message->create_session_response; @@ -99,10 +96,30 @@ rv = ogs_gtp_xact_commit(s5c_xact); ogs_expect(rv == OGS_OK); + /************************ + * Check Session Context + ************************/ + cause_value = OGS_GTP2_CAUSE_REQUEST_ACCEPTED; + + if (!sess) { + ogs_error("No Context in TEID"); + cause_value = OGS_GTP2_CAUSE_CONTEXT_NOT_FOUND; + } else { + sgwc_ue = sess->sgwc_ue; + ogs_assert(sgwc_ue); + } + + if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) { + ogs_gtp_send_error_message( + s11_xact, sgwc_ue ? sgwc_ue->mme_s11_teid : 0, + OGS_GTP2_CREATE_SESSION_RESPONSE_TYPE, cause_value); + return; + } + /***************************************** * Check Mandatory/Conditional IE Missing *****************************************/ - cause_value = OGS_GTP2_CAUSE_REQUEST_ACCEPTED; + ogs_assert(cause_value == OGS_GTP2_CAUSE_REQUEST_ACCEPTED); if (rsp->pgw_s5_s8__s2a_s2b_f_teid_for_pmip_based_interface_or_for_gtp_based_control_plane_interface.presence == 0) { ogs_error("No GTP TEID"); @@ -265,29 +282,24 @@ OGS_PFCP_MODIFY_UL_ONLY|OGS_PFCP_MODIFY_ACTIVATE)); } -void sgwc_s5c_handle_modify_bearer_response( +void sgwc_s5c_handle_delete_session_response( sgwc_sess_t *sess, ogs_gtp_xact_t *s5c_xact, ogs_pkbuf_t *gtpbuf, ogs_gtp2_message_t *message) { int rv; ogs_gtp2_cause_t *cause = NULL; uint8_t cause_value; - int modify_action; sgwc_ue_t *sgwc_ue = NULL; - ogs_pkbuf_t *pkbuf = NULL; ogs_gtp_xact_t *s11_xact = NULL; - ogs_gtp2_modify_bearer_response_t *rsp = NULL; + ogs_gtp2_delete_session_response_t *rsp = NULL; - ogs_assert(sess); - sgwc_ue = sess->sgwc_ue; - ogs_assert(sgwc_ue); ogs_assert(message); - rsp = &message->modify_bearer_response; + rsp = &message->delete_session_response; ogs_assert(rsp); - ogs_debug("Modify Bearer Response"); + ogs_debug("Delete Session Response"); /******************** * Check Transaction @@ -295,15 +307,34 @@ ogs_assert(s5c_xact); s11_xact = s5c_xact->assoc_xact; ogs_assert(s11_xact); - modify_action = s5c_xact->modify_action; rv = ogs_gtp_xact_commit(s5c_xact); ogs_expect(rv == OGS_OK); + /************************ + * Check Session Context + ************************/ + cause_value = OGS_GTP2_CAUSE_REQUEST_ACCEPTED; + + if (!sess) { + ogs_error("No Context in TEID"); + cause_value = OGS_GTP2_CAUSE_CONTEXT_NOT_FOUND; + } else { + sgwc_ue = sess->sgwc_ue; + ogs_assert(sgwc_ue); + } + + if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) { + ogs_gtp_send_error_message( + s11_xact, sgwc_ue ? sgwc_ue->mme_s11_teid : 0, + OGS_GTP2_DELETE_SESSION_RESPONSE_TYPE, cause_value); + return; + } + /***************************************** * Check Mandatory/Conditional IE Missing *****************************************/ - cause_value = OGS_GTP2_CAUSE_REQUEST_ACCEPTED; + ogs_assert(cause_value == OGS_GTP2_CAUSE_REQUEST_ACCEPTED); if (rsp->cause.presence == 0) { ogs_error("No Cause"); @@ -311,14 +342,9 @@ } if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) { - if (modify_action == OGS_GTP_MODIFY_IN_PATH_SWITCH_REQUEST) - ogs_gtp_send_error_message( - s11_xact, sgwc_ue ? sgwc_ue->mme_s11_teid : 0, - OGS_GTP2_CREATE_SESSION_RESPONSE_TYPE, cause_value); - else - ogs_gtp_send_error_message( - s11_xact, sgwc_ue ? sgwc_ue->mme_s11_teid : 0, - OGS_GTP2_MODIFY_BEARER_RESPONSE_TYPE, cause_value); + ogs_gtp_send_error_message( + s11_xact, sgwc_ue ? sgwc_ue->mme_s11_teid : 0, + OGS_GTP2_DELETE_SESSION_RESPONSE_TYPE, cause_value); return; } @@ -332,67 +358,52 @@ cause_value = cause->value; if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) { ogs_error("GTP Failed CAUSE:%d", cause_value); - if (modify_action == OGS_GTP_MODIFY_IN_PATH_SWITCH_REQUEST) - ogs_gtp_send_error_message( - s11_xact, sgwc_ue ? sgwc_ue->mme_s11_teid : 0, - OGS_GTP2_CREATE_SESSION_RESPONSE_TYPE, cause_value); - else - ogs_gtp_send_error_message( - s11_xact, sgwc_ue ? sgwc_ue->mme_s11_teid : 0, - OGS_GTP2_MODIFY_BEARER_RESPONSE_TYPE, cause_value); + ogs_gtp_send_error_message( + s11_xact, sgwc_ue ? sgwc_ue->mme_s11_teid : 0, + OGS_GTP2_DELETE_SESSION_RESPONSE_TYPE, cause_value); return; } /******************** * Check ALL Context ********************/ - ogs_assert(sgwc_ue); ogs_assert(sess); + ogs_assert(sgwc_ue); + /* Remove a pgw session */ ogs_debug(" MME_S11_TEID%d SGW_S11_TEID%d", sgwc_ue->mme_s11_teid, sgwc_ue->sgw_s11_teid); ogs_debug(" SGW_S5C_TEID0x%x PGW_S5C_TEID0x%x", sess->sgw_s5c_teid, sess->pgw_s5c_teid); - if (modify_action == OGS_GTP_MODIFY_IN_PATH_SWITCH_REQUEST) { - ogs_assert(OGS_OK == - sgwc_gtp_send_create_session_response(sess, s11_xact)); - } else { - message->h.type = OGS_GTP2_MODIFY_BEARER_RESPONSE_TYPE; - message->h.teid = sgwc_ue->mme_s11_teid; - - pkbuf = ogs_gtp2_build_msg(message); - ogs_expect_or_return(pkbuf); - - rv = ogs_gtp_xact_update_tx(s11_xact, &message->h, pkbuf); - ogs_expect_or_return(rv == OGS_OK); - - rv = ogs_gtp_xact_commit(s11_xact); - ogs_expect(rv == OGS_OK); - } + /* + * 1. MME sends Delete Session Request to SGW/SMF. + * 2. SMF sends Delete Session Response to SGW/MME. + */ + ogs_assert(OGS_OK == + sgwc_pfcp_send_session_deletion_request(sess, s11_xact, gtpbuf)); } -void sgwc_s5c_handle_delete_session_response( +void sgwc_s5c_handle_modify_bearer_response( sgwc_sess_t *sess, ogs_gtp_xact_t *s5c_xact, ogs_pkbuf_t *gtpbuf, ogs_gtp2_message_t *message) { int rv; ogs_gtp2_cause_t *cause = NULL; uint8_t cause_value; + int modify_action; sgwc_ue_t *sgwc_ue = NULL; + ogs_pkbuf_t *pkbuf = NULL; ogs_gtp_xact_t *s11_xact = NULL;
View file
open5gs_2.4.8.202206300002.tar.xz/src/sgwc/sgwc-sm.c -> open5gs_2.4.8.202207010002.tar.xz/src/sgwc/sgwc-sm.c
Changed
@@ -157,7 +157,7 @@ if (gtp_message.h.teid_presence && gtp_message.h.teid != 0) { /* Cause is not "Context not found" */ sgwc_ue = sgwc_ue_find_by_teid(gtp_message.h.teid); - } else if (gtp_xact->local_teid) { /* rx no TEID or TEID=0 */ + } else if (gtp_xact->local_teid) { /* rx no TEID or TEID=0 */ /* 3GPP TS 29.274 5.5.2: we receive TEID=0 under some * conditions, such as cause "Session context not found". In those * cases, we still want to identify the local session which
View file
open5gs_2.4.8.202206300002.tar.xz/src/sgwc/sxa-handler.c -> open5gs_2.4.8.202207010002.tar.xz/src/sgwc/sxa-handler.c
Changed
@@ -157,7 +157,6 @@ ogs_debug("Session Establishment Response"); - ogs_assert(sess); ogs_assert(pfcp_xact); ogs_assert(pfcp_rsp); ogs_assert(recv_message); @@ -172,6 +171,11 @@ cause_value = OGS_GTP2_CAUSE_REQUEST_ACCEPTED; + if (!sess) { + ogs_warn("No Context"); + cause_value = OGS_GTP2_CAUSE_CONTEXT_NOT_FOUND; + } + if (pfcp_rsp->up_f_seid.presence == 0) { ogs_error("No UP F-SEID"); cause_value = OGS_GTP2_CAUSE_MANDATORY_IE_MISSING; @@ -449,7 +453,6 @@ ogs_debug("Session Modification Response"); - ogs_assert(sess); ogs_assert(pfcp_xact); ogs_assert(pfcp_rsp); @@ -459,12 +462,30 @@ cause_value = OGS_GTP2_CAUSE_REQUEST_ACCEPTED; if (flags & OGS_PFCP_MODIFY_SESSION) { + if (!sess) { + ogs_warn("No Context"); + + sess = pfcp_xact->data; + ogs_assert(sess); + + cause_value = OGS_GTP2_CAUSE_CONTEXT_NOT_FOUND; + } sgwc_ue = sess->sgwc_ue; ogs_assert(sgwc_ue); } else { bearer = pfcp_xact->data; ogs_assert(bearer); + + if (!sess) { + ogs_warn("No Context"); + + sess = bearer->sess; + ogs_assert(sess); + + cause_value = OGS_GTP2_CAUSE_CONTEXT_NOT_FOUND; + } + sgwc_ue = bearer->sgwc_ue; ogs_assert(sgwc_ue); } @@ -1185,12 +1206,16 @@ ogs_debug("Session Deletion Response"); - ogs_assert(sess); ogs_assert(pfcp_xact); ogs_assert(pfcp_rsp); cause_value = OGS_GTP2_CAUSE_REQUEST_ACCEPTED; + if (!sess) { + ogs_warn("No Context"); + cause_value = OGS_GTP2_CAUSE_CONTEXT_NOT_FOUND; + } + if (pfcp_rsp->cause.presence) { if (pfcp_rsp->cause.u8 != OGS_PFCP_CAUSE_REQUEST_ACCEPTED) { ogs_warn("PFCP Cause%d : Not Accepted", pfcp_rsp->cause.u8); @@ -1299,12 +1324,16 @@ ogs_debug("Session Report Request"); - ogs_assert(sess); ogs_assert(pfcp_xact); ogs_assert(pfcp_req); cause_value = OGS_GTP2_CAUSE_REQUEST_ACCEPTED; + if (!sess) { + ogs_warn("No Context"); + cause_value = OGS_PFCP_CAUSE_SESSION_CONTEXT_NOT_FOUND; + } + if (pfcp_req->report_type.presence == 0) { ogs_error("No Report Type"); cause_value = OGS_GTP2_CAUSE_MANDATORY_IE_MISSING;
View file
open5gs_2.4.8.202206300002.tar.xz/src/smf/n4-handler.c -> open5gs_2.4.8.202207010002.tar.xz/src/smf/n4-handler.c
Changed
@@ -255,7 +255,6 @@ ogs_debug("Session Modification Response 5gc"); - ogs_assert(sess); ogs_assert(xact); ogs_assert(rsp); @@ -280,6 +279,11 @@ status = OGS_SBI_HTTP_STATUS_OK; + if (!sess) { + ogs_warn("No Context"); + status = OGS_SBI_HTTP_STATUS_NOT_FOUND; + } + if (rsp->cause.presence) { if (rsp->cause.u8 != OGS_PFCP_CAUSE_REQUEST_ACCEPTED) { ogs_warn("PFCP Cause %d : Not Accepted", rsp->cause.u8); @@ -620,7 +624,10 @@ status = OGS_SBI_HTTP_STATUS_OK; - ogs_assert(sess); + if (!sess) { + ogs_warn("No Context"); + status = OGS_SBI_HTTP_STATUS_NOT_FOUND; + } if (rsp->cause.presence) { if (rsp->cause.u8 != OGS_PFCP_CAUSE_REQUEST_ACCEPTED) { @@ -662,6 +669,8 @@ return status; } + ogs_assert(sess); + return status; } @@ -794,7 +803,6 @@ OGS_LIST(pdr_to_create_list); - ogs_assert(sess); ogs_assert(xact); ogs_assert(rsp); @@ -823,6 +831,11 @@ ogs_pfcp_xact_commit(xact); + if (!sess) { + ogs_error("No Context"); + return; + } + if (rsp->cause.presence) { if (rsp->cause.u8 != OGS_PFCP_CAUSE_REQUEST_ACCEPTED) { ogs_error("PFCP Cause %d : Not Accepted", rsp->cause.u8); @@ -1098,7 +1111,6 @@ uint16_t pdr_id = 0; unsigned int i; - ogs_assert(sess); ogs_assert(pfcp_xact); ogs_assert(pfcp_req); @@ -1106,6 +1118,11 @@ cause_value = OGS_GTP2_CAUSE_REQUEST_ACCEPTED; + if (!sess) { + ogs_warn("No Context"); + cause_value = OGS_PFCP_CAUSE_SESSION_CONTEXT_NOT_FOUND; + } + if (pfcp_req->report_type.presence == 0) { ogs_error("No Report Type"); cause_value = OGS_GTP2_CAUSE_MANDATORY_IE_MISSING; @@ -1118,6 +1135,7 @@ return; } + ogs_assert(sess); report_type.value = pfcp_req->report_type.u8; if (report_type.downlink_data_report) {
View file
open5gs_2.4.8.202206300002.tar.xz/src/smf/pfcp-path.c -> open5gs_2.4.8.202207010002.tar.xz/src/smf/pfcp-path.c
Changed
@@ -329,8 +329,6 @@ ogs_assert(sess); ogs_assert(xact); - xact->local_seid = sess->smf_n4_seid; - memset(&h, 0, sizeof(ogs_pfcp_header_t)); h.type = OGS_PFCP_SESSION_MODIFICATION_REQUEST_TYPE; h.seid = sess->upf_n4_seid; @@ -402,6 +400,7 @@ ogs_expect_or_return_val(xact, OGS_ERROR); xact->assoc_stream = stream; + xact->local_seid = sess->smf_n4_seid; xact->modify_flags = flags | OGS_PFCP_MODIFY_SESSION; ogs_list_init(&sess->pdr_to_modify_list); @@ -428,6 +427,7 @@ ogs_expect_or_return_val(xact, OGS_ERROR); xact->assoc_stream = stream; + xact->local_seid = sess->smf_n4_seid; xact->modify_flags = flags | OGS_PFCP_MODIFY_SESSION; rv = smf_pfcp_send_modify_list( @@ -519,6 +519,7 @@ xact->epc = true; /* EPC PFCP transaction */ xact->assoc_xact = gtp_xact; + xact->local_seid = sess->smf_n4_seid; xact->modify_flags = flags | OGS_PFCP_MODIFY_SESSION; xact->gtp_pti = gtp_pti; @@ -557,6 +558,7 @@ xact->epc = true; /* EPC PFCP transaction */ xact->assoc_xact = gtp_xact; + xact->local_seid = sess->smf_n4_seid; xact->modify_flags = flags; xact->gtp_pti = gtp_pti;
View file
open5gs_2.4.8.202206300002.tar.xz/src/smf/pfcp-sm.c -> open5gs_2.4.8.202207010002.tar.xz/src/smf/pfcp-sm.c
Changed
@@ -221,12 +221,26 @@ break; case OGS_PFCP_SESSION_ESTABLISHMENT_RESPONSE_TYPE: if (!message->h.seid_presence) ogs_error("No SEID"); - ogs_assert(sess); + + if (!sess) { + ogs_gtp_xact_t *gtp_xact = xact->assoc_xact; + ogs_assert(gtp_xact); + if (gtp_xact->gtp_version == 1) + ogs_gtp1_send_error_message(gtp_xact, 0, + OGS_GTP1_CREATE_PDP_CONTEXT_RESPONSE_TYPE, + OGS_GTP1_CAUSE_CONTEXT_NOT_FOUND); + else + ogs_gtp2_send_error_message(gtp_xact, 0, + OGS_GTP2_CREATE_SESSION_RESPONSE_TYPE, + OGS_GTP2_CAUSE_CONTEXT_NOT_FOUND); + break; + } ogs_fsm_dispatch(&sess->sm, e); break; case OGS_PFCP_SESSION_MODIFICATION_RESPONSE_TYPE: if (!message->h.seid_presence) ogs_error("No SEID"); + if (xact->epc) smf_epc_n4_handle_session_modification_response( sess, xact, e->gtp2_message, @@ -238,12 +252,28 @@ case OGS_PFCP_SESSION_DELETION_RESPONSE_TYPE: if (!message->h.seid_presence) ogs_error("No SEID"); - ogs_assert(sess); + + if (!sess) { + ogs_gtp_xact_t *gtp_xact = xact->assoc_xact; + if (!gtp_xact) + break; + if (gtp_xact->gtp_version == 1) + ogs_gtp1_send_error_message(gtp_xact, 0, + OGS_GTP1_CREATE_PDP_CONTEXT_RESPONSE_TYPE, + OGS_GTP1_CAUSE_CONTEXT_NOT_FOUND); + else + ogs_gtp2_send_error_message(gtp_xact, 0, + OGS_GTP2_CREATE_SESSION_RESPONSE_TYPE, + OGS_GTP2_CAUSE_CONTEXT_NOT_FOUND); + break; + } + ogs_fsm_dispatch(&sess->sm, e); break; case OGS_PFCP_SESSION_REPORT_REQUEST_TYPE: if (!message->h.seid_presence) ogs_error("No SEID"); + smf_n4_handle_session_report_request( sess, xact, &message->pfcp_session_report_request); break;
View file
open5gs_2.4.8.202206300002.tar.xz/src/smf/s5c-handler.c -> open5gs_2.4.8.202207010002.tar.xz/src/smf/s5c-handler.c
Changed
@@ -556,6 +556,7 @@ pfcp_xact->gtp_pti = OGS_NAS_PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED; pfcp_xact->gtp_cause = OGS_GTP2_CAUSE_UNDEFINED_VALUE; + pfcp_xact->local_seid = sess->smf_n4_seid; ogs_assert(gtpbuf); pfcp_xact->gtpbuf = ogs_pkbuf_copy(gtpbuf); @@ -595,7 +596,6 @@ smf_bearer_t *bearer = NULL; ogs_pfcp_far_t *dl_far = NULL; - ogs_assert(sess); ogs_assert(rsp); ogs_debug("Create Bearer Response"); @@ -615,6 +615,11 @@ ************************/ cause_value = OGS_GTP2_CAUSE_REQUEST_ACCEPTED; + if (!sess) { + ogs_error("No Context in TEID"); + cause_value = OGS_GTP2_CAUSE_CONTEXT_NOT_FOUND; + } + if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) { ogs_assert(OGS_OK == smf_epc_pfcp_send_one_bearer_modification_request( @@ -766,7 +771,6 @@ uint64_t pfcp_flags = 0; smf_bearer_t *bearer = NULL; - ogs_assert(sess); ogs_assert(rsp); ogs_debug("Update Bearer Response"); @@ -783,10 +787,24 @@ rv = ogs_gtp_xact_commit(xact); ogs_expect(rv == OGS_OK); + /************************ + * Check Session Context + ************************/ + cause_value = OGS_GTP2_CAUSE_REQUEST_ACCEPTED; + + if (!sess) { + ogs_error("No Context in TEID"); + cause_value = OGS_GTP2_CAUSE_CONTEXT_NOT_FOUND; + } + + if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) { + return; + } + /***************************************** * Check Mandatory/Conditional IE Missing *****************************************/ - cause_value = OGS_GTP2_CAUSE_REQUEST_ACCEPTED; + ogs_assert(cause_value == OGS_GTP2_CAUSE_REQUEST_ACCEPTED); if (rsp->bearer_contexts.presence == 0) { ogs_error("No Bearer"); @@ -870,7 +888,6 @@ uint8_t cause_value; smf_bearer_t *bearer = NULL; - ogs_assert(sess); ogs_assert(rsp); ogs_debug("Delete Bearer Response"); @@ -885,10 +902,18 @@ rv = ogs_gtp_xact_commit(xact); ogs_expect(rv == OGS_OK); + /************************ + * Check Session Context + ************************/ + if (!sess) + ogs_error("No Context in TEID"); + /******************** * Check ALL Context ********************/ ogs_assert(bearer); + sess = bearer->sess; + ogs_assert(sess); if (rsp->linked_eps_bearer_id.presence) { /*
View file
open5gs_2.4.8.202206300002.tar.xz/src/smf/smf-sm.c -> open5gs_2.4.8.202207010002.tar.xz/src/smf/smf-sm.c
Changed
@@ -179,7 +179,11 @@ break; case OGS_GTP2_DELETE_BEARER_RESPONSE_TYPE: if (!gtp2_message.h.teid_presence) ogs_error("No TEID"); - ogs_assert(sess); + if (!sess) { + /* TODO: NACK the message */ + ogs_error("TODO: NACK the message"); + break; + } e->sess = sess; ogs_fsm_dispatch(&sess->sm, e); break;
View file
open5gs_2.4.8.202206300002.tar.xz/src/udr/nudr-handler.c -> open5gs_2.4.8.202207010002.tar.xz/src/udr/nudr-handler.c
Changed
@@ -539,13 +539,26 @@ ogs_assert(SubscribedSnssaiInfoList); for (i = 0; i < subscription_data.num_of_slice; i++) { + if (i >= OGS_MAX_NUM_OF_SLICE) { + ogs_warn("Ignore max slice count overflow %d>=%d", + subscription_data.num_of_slice, OGS_MAX_NUM_OF_SLICE); + break; + } slice_data = &subscription_data.slicei; DnnInfoList = OpenAPI_list_create(); ogs_assert(DnnInfoList); for (j = 0; j < slice_data->num_of_session; j++) { - ogs_session_t *session = &slice_data->sessionj; + ogs_session_t *session = NULL; + + if (j >= OGS_MAX_NUM_OF_SESS) { + ogs_warn("Ignore max session count overflow %d>=%d", + slice_data->num_of_session, OGS_MAX_NUM_OF_SESS); + break; + } + + session = &slice_data->sessionj; ogs_assert(session); ogs_assert(session->name); @@ -662,7 +675,15 @@ dnnConfigurationList = OpenAPI_list_create(); for (i = 0; i < slice_data->num_of_session; i++) { - ogs_session_t *session = &slice_data->sessioni; + ogs_session_t *session = NULL; + + if (i >= OGS_MAX_NUM_OF_SESS) { + ogs_warn("Ignore max session count overflow %d>=%d", + slice_data->num_of_session, OGS_MAX_NUM_OF_SESS); + break; + } + + session = &slice_data->sessioni; ogs_assert(session); ogs_assert(session->name); @@ -1024,7 +1045,15 @@ slice_data = &subscription_data.slice0; for (i = 0; i < slice_data->num_of_session; i++) { - ogs_session_t *session = &slice_data->sessioni; + ogs_session_t *session = NULL; + + if (i >= OGS_MAX_NUM_OF_SESS) { + ogs_warn("Ignore max session count overflow %d>=%d", + slice_data->num_of_session, OGS_MAX_NUM_OF_SESS); + break; + } + + session = &slice_data->sessioni; ogs_assert(session); ogs_assert(session->name);
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
.