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 654
View file
open5gs_2.7.0.126.eb2b.202404042026.dsc -> open5gs_2.7.0.128.30648.202404052026.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-sepp, open5gs-ausf, open5gs-udm, open5gs-pcf, open5gs-nssf, open5gs-bsf, open5gs-udr, open5gs, open5gs-dbg Architecture: any -Version: 2.7.0.126.eb2b.202404042026 +Version: 2.7.0.128.30648.202404052026 Maintainer: Harald Welte <laforge@gnumonks.org> Uploaders: Sukchan Lee <acetcom@gmail.com> Homepage: https://open5gs.org @@ -32,8 +32,8 @@ open5gs-udr deb net optional arch=any open5gs-upf deb net optional arch=any Checksums-Sha1: - ef775b1e733b8f3beeede28aec2d2c13dce2e4c0 14487084 open5gs_2.7.0.126.eb2b.202404042026.tar.xz + e2eef4ee2269878a50d13707d30bf4f6f669ae13 14488320 open5gs_2.7.0.128.30648.202404052026.tar.xz Checksums-Sha256: - adce053ea3a0aef9582b963fdf8708dc5f8f1ca0528b0142a4710e7b2b7fb5d3 14487084 open5gs_2.7.0.126.eb2b.202404042026.tar.xz + 11d6afe2e86d483f5ec478401e2a561373c3fed46480610352bd3db19a1e7874 14488320 open5gs_2.7.0.128.30648.202404052026.tar.xz Files: - 7420079c1ea7bdba26bc6478e6080ef1 14487084 open5gs_2.7.0.126.eb2b.202404042026.tar.xz + 7cd88d66dcad2d41d93706b0c0058ca6 14488320 open5gs_2.7.0.128.30648.202404052026.tar.xz
View file
open5gs_2.7.0.126.eb2b.202404042026.tar.xz/.tarball-version -> open5gs_2.7.0.128.30648.202404052026.tar.xz/.tarball-version
Changed
@@ -1 +1 @@ -2.7.0.126-eb2b.202404042026 +2.7.0.128-30648.202404052026
View file
open5gs_2.7.0.126.eb2b.202404042026.tar.xz/debian/changelog -> open5gs_2.7.0.128.30648.202404052026.tar.xz/debian/changelog
Changed
@@ -1,8 +1,8 @@ -open5gs (2.7.0.126.eb2b.202404042026) unstable; urgency=medium +open5gs (2.7.0.128.30648.202404052026) unstable; urgency=medium * Automatically generated changelog entry for building the Osmocom nightly feed - -- Osmocom OBS scripts <info@osmocom.org> Thu, 04 Apr 2024 20:27:44 +0000 + -- Osmocom OBS scripts <info@osmocom.org> Fri, 05 Apr 2024 20:27:38 +0000 open5gs (2.7.0) unstable; urgency=medium
View file
open5gs_2.7.0.126.eb2b.202404042026.tar.xz/docs/_docs/guide/01-quickstart.md -> open5gs_2.7.0.128.30648.202404052026.tar.xz/docs/_docs/guide/01-quickstart.md
Changed
@@ -233,7 +233,7 @@ SGWC-gtpc = 127.0.0.3 :2123 for S11 SGWC-pfcp = 127.0.0.3 :8805 for Sxa -SMF-gtpc = 127.0.0.4 :2123 for S5c, N11 +SMF-gtpc = 127.0.0.4 :2123 for S5c SMF-gtpu = 127.0.0.4 :2152 for N4u (Sxu) SMF-pfcp = 127.0.0.4 :8805 for N4 (Sxb) SMF-frDi = 127.0.0.4 :3868 for Gx auth
View file
open5gs_2.7.0.126.eb2b.202404042026.tar.xz/src/mme/mme-s11-handler.c -> open5gs_2.7.0.128.30648.202404052026.tar.xz/src/mme/mme-s11-handler.c
Changed
@@ -60,9 +60,13 @@ } void mme_s11_handle_echo_request( - ogs_gtp_xact_t *xact, ogs_gtp2_echo_request_t *req) + ogs_gtp_xact_t *xact, ogs_gtp2_message_t *gtp2_message) { + ogs_gtp2_echo_request_t *req = NULL; + ogs_assert(xact); + ogs_assert(gtp2_message); + req = >p2_message->echo_request; ogs_assert(req); ogs_debug("Receiving Echo Request"); @@ -72,14 +76,14 @@ } void mme_s11_handle_echo_response( - ogs_gtp_xact_t *xact, ogs_gtp2_echo_response_t *rsp) + ogs_gtp_xact_t *xact, ogs_gtp2_message_t *gtp2_message) { /* Not Implemented */ } void mme_s11_handle_create_session_response( ogs_gtp_xact_t *xact, mme_ue_t *mme_ue_from_teid, - ogs_gtp2_create_session_response_t *rsp) + ogs_gtp2_message_t *gtp2_message) { int i, r, rv; uint8_t cause_value = OGS_GTP2_CAUSE_UNDEFINED_VALUE; @@ -100,6 +104,10 @@ uint16_t decoded = 0; int create_action = 0; + ogs_gtp2_create_session_response_t *rsp = NULL; + + ogs_assert(gtp2_message); + rsp = >p2_message->create_session_response; ogs_assert(rsp); ogs_debug("Create Session Response"); @@ -472,7 +480,7 @@ void mme_s11_handle_modify_bearer_response( ogs_gtp_xact_t *xact, mme_ue_t *mme_ue_from_teid, - ogs_gtp2_modify_bearer_response_t *rsp) + ogs_gtp2_message_t *gtp2_message) { int r, rv; uint8_t cause_value = OGS_GTP2_CAUSE_UNDEFINED_VALUE; @@ -482,6 +490,10 @@ mme_ue_t *mme_ue = NULL; sgw_ue_t *sgw_ue = NULL; + ogs_gtp2_modify_bearer_response_t *rsp = NULL; + + ogs_assert(gtp2_message); + rsp = >p2_message->modify_bearer_response; ogs_assert(rsp); ogs_debug("Modify Bearer Response"); @@ -586,7 +598,7 @@ void mme_s11_handle_delete_session_response( ogs_gtp_xact_t *xact, mme_ue_t *mme_ue_from_teid, - ogs_gtp2_delete_session_response_t *rsp) + ogs_gtp2_message_t *gtp2_message) { int r, rv; uint8_t cause_value = OGS_GTP2_CAUSE_UNDEFINED_VALUE; @@ -595,6 +607,10 @@ mme_sess_t *sess = NULL; mme_ue_t *mme_ue = NULL; + ogs_gtp2_delete_session_response_t *rsp = NULL; + + ogs_assert(gtp2_message); + rsp = >p2_message->delete_session_response; ogs_assert(rsp); ogs_debug("Delete Session Response"); @@ -778,7 +794,7 @@ void mme_s11_handle_create_bearer_request( ogs_gtp_xact_t *xact, mme_ue_t *mme_ue, - ogs_gtp2_create_bearer_request_t *req) + ogs_gtp2_message_t *gtp2_message) { int r; uint8_t cause_value = OGS_GTP2_CAUSE_UNDEFINED_VALUE; @@ -790,7 +806,11 @@ ogs_gtp2_f_teid_t *pgw_s5u_teid = NULL; ogs_gtp2_bearer_qos_t bearer_qos; + ogs_gtp2_create_bearer_request_t *req = NULL; + ogs_assert(xact); + ogs_assert(gtp2_message); + req = >p2_message->create_bearer_request; ogs_assert(req); ogs_debug("Create Bearer Request"); @@ -823,7 +843,8 @@ } if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) { - ogs_gtp2_send_error_message(xact, sgw_ue ? sgw_ue->sgw_s11_teid : 0, + ogs_gtp2_send_error_message(xact, + sgw_ue ? sgw_ue->sgw_s11_teid : gtp2_message->h.teid, OGS_GTP2_CREATE_BEARER_RESPONSE_TYPE, cause_value); return; } @@ -859,7 +880,8 @@ } if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) { - ogs_gtp2_send_error_message(xact, sgw_ue ? sgw_ue->sgw_s11_teid : 0, + ogs_gtp2_send_error_message(xact, + sgw_ue ? sgw_ue->sgw_s11_teid : gtp2_message->h.teid, OGS_GTP2_CREATE_BEARER_RESPONSE_TYPE, cause_value); return; } @@ -982,7 +1004,7 @@ void mme_s11_handle_update_bearer_request( ogs_gtp_xact_t *xact, mme_ue_t *mme_ue, - ogs_gtp2_update_bearer_request_t *req) + ogs_gtp2_message_t *gtp2_message) { int r; uint8_t cause_value = OGS_GTP2_CAUSE_UNDEFINED_VALUE; @@ -991,7 +1013,11 @@ sgw_ue_t *sgw_ue = NULL; ogs_gtp2_bearer_qos_t bearer_qos; + ogs_gtp2_update_bearer_request_t *req = NULL; + ogs_assert(xact); + ogs_assert(gtp2_message); + req = >p2_message->update_bearer_request; ogs_assert(req); ogs_debug("Update Bearer Request"); @@ -1028,7 +1054,8 @@ } if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) { - ogs_gtp2_send_error_message(xact, sgw_ue ? sgw_ue->sgw_s11_teid : 0, + ogs_gtp2_send_error_message(xact, + sgw_ue ? sgw_ue->sgw_s11_teid : gtp2_message->h.teid, OGS_GTP2_UPDATE_BEARER_RESPONSE_TYPE, cause_value); return; } @@ -1129,7 +1156,7 @@ void mme_s11_handle_delete_bearer_request( ogs_gtp_xact_t *xact, mme_ue_t *mme_ue, - ogs_gtp2_delete_bearer_request_t *req) + ogs_gtp2_message_t *gtp2_message) { int r; uint8_t cause_value = OGS_GTP2_CAUSE_UNDEFINED_VALUE; @@ -1138,7 +1165,11 @@ mme_sess_t *sess = NULL; sgw_ue_t *sgw_ue = NULL; + ogs_gtp2_delete_bearer_request_t *req = NULL; + ogs_assert(xact); + ogs_assert(gtp2_message); + req = >p2_message->delete_bearer_request; ogs_assert(req); ogs_debug("Delete Bearer Request"); @@ -1199,7 +1230,8 @@ } if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) { - ogs_gtp2_send_error_message(xact, sgw_ue ? sgw_ue->sgw_s11_teid : 0, + ogs_gtp2_send_error_message(xact, + sgw_ue ? sgw_ue->sgw_s11_teid : gtp2_message->h.teid, OGS_GTP2_DELETE_BEARER_RESPONSE_TYPE, OGS_GTP2_CAUSE_CONTEXT_NOT_FOUND); return; @@ -1250,7 +1282,7 @@ void mme_s11_handle_release_access_bearers_response( ogs_gtp_xact_t *xact, mme_ue_t *mme_ue_from_teid, - ogs_gtp2_release_access_bearers_response_t *rsp) + ogs_gtp2_message_t *gtp2_message) { int r, rv; uint8_t cause_value = OGS_GTP2_CAUSE_UNDEFINED_VALUE; @@ -1262,6 +1294,10 @@ mme_sess_t *sess = NULL; mme_bearer_t *bearer = NULL; + ogs_gtp2_release_access_bearers_response_t *rsp = NULL;
View file
open5gs_2.7.0.126.eb2b.202404042026.tar.xz/src/mme/mme-s11-handler.h -> open5gs_2.7.0.128.30648.202404052026.tar.xz/src/mme/mme-s11-handler.h
Changed
@@ -27,44 +27,44 @@ #endif void mme_s11_handle_echo_request( - ogs_gtp_xact_t *xact, ogs_gtp2_echo_request_t *req); + ogs_gtp_xact_t *xact, ogs_gtp2_message_t *gtp2_message); void mme_s11_handle_echo_response( - ogs_gtp_xact_t *xact, ogs_gtp2_echo_response_t *rsp); + ogs_gtp_xact_t *xact, ogs_gtp2_message_t *gtp2_message); void mme_s11_handle_create_session_response( ogs_gtp_xact_t *xact, mme_ue_t *mme_ue, - ogs_gtp2_create_session_response_t *rsp); + ogs_gtp2_message_t *gtp2_message); void mme_s11_handle_modify_bearer_response( ogs_gtp_xact_t *xact, mme_ue_t *mme_ue, - ogs_gtp2_modify_bearer_response_t *rsp); + ogs_gtp2_message_t *gtp2_message); void mme_s11_handle_delete_session_response( ogs_gtp_xact_t *xact, mme_ue_t *mme_ue, - ogs_gtp2_delete_session_response_t *rsp); + ogs_gtp2_message_t *gtp2_message); void mme_s11_handle_create_bearer_request( ogs_gtp_xact_t *xact, mme_ue_t *mme_ue, - ogs_gtp2_create_bearer_request_t *req); + ogs_gtp2_message_t *gtp2_message); void mme_s11_handle_update_bearer_request( ogs_gtp_xact_t *xact, mme_ue_t *mme_ue, - ogs_gtp2_update_bearer_request_t *req); + ogs_gtp2_message_t *gtp2_message); void mme_s11_handle_delete_bearer_request( ogs_gtp_xact_t *xact, mme_ue_t *mme_ue, - ogs_gtp2_delete_bearer_request_t *req); + ogs_gtp2_message_t *gtp2_message); void mme_s11_handle_release_access_bearers_response( ogs_gtp_xact_t *xact, mme_ue_t *mme_ue, - ogs_gtp2_release_access_bearers_response_t *rsp); + ogs_gtp2_message_t *gtp2_message); void mme_s11_handle_downlink_data_notification( ogs_gtp_xact_t *xact, mme_ue_t *mme_ue, - ogs_gtp2_downlink_data_notification_t *noti); + ogs_gtp2_message_t *gtp2_message); void mme_s11_handle_create_indirect_data_forwarding_tunnel_response( ogs_gtp_xact_t *xact, mme_ue_t *mme_ue, - ogs_gtp2_create_indirect_data_forwarding_tunnel_response_t *rsp); + ogs_gtp2_message_t *gtp2_message); void mme_s11_handle_delete_indirect_data_forwarding_tunnel_response( ogs_gtp_xact_t *xact, mme_ue_t *mme_ue, - ogs_gtp2_delete_indirect_data_forwarding_tunnel_response_t *rsp); + ogs_gtp2_message_t *gtp2_message); void mme_s11_handle_bearer_resource_failure_indication( ogs_gtp_xact_t *xact, mme_ue_t *mme_ue, - ogs_gtp2_bearer_resource_failure_indication_t *ind); + ogs_gtp2_message_t *gtp2_message); #ifdef __cplusplus }
View file
open5gs_2.7.0.126.eb2b.202404042026.tar.xz/src/mme/mme-sm.c -> open5gs_2.7.0.128.30648.202404052026.tar.xz/src/mme/mme-sm.c
Changed
@@ -79,7 +79,7 @@ ogs_gtp_node_t *gnode = NULL; ogs_gtp_xact_t *xact = NULL; - ogs_gtp2_message_t gtp_message; + ogs_gtp2_message_t gtp2_message; ogs_gtp1_message_t gtp1_message; mme_vlr_t *vlr = NULL; @@ -650,7 +650,7 @@ pkbuf = e->pkbuf; ogs_assert(pkbuf); - if (ogs_gtp2_parse_msg(>p_message, pkbuf) != OGS_OK) { + if (ogs_gtp2_parse_msg(>p2_message, pkbuf) != OGS_OK) { ogs_error("ogs_gtp2_parse_msg() failed"); ogs_pkbuf_free(pkbuf); break; @@ -659,7 +659,7 @@ gnode = e->gnode; ogs_assert(gnode); - rv = ogs_gtp_xact_receive(gnode, >p_message.h, &xact); + rv = ogs_gtp_xact_receive(gnode, >p2_message.h, &xact); if (rv != OGS_OK) { ogs_pkbuf_free(pkbuf); break; @@ -694,9 +694,9 @@ * However in this case, the cause code shall not be set to * "Context not found". */ - if (gtp_message.h.teid_presence && gtp_message.h.teid != 0) { + if (gtp2_message.h.teid_presence && gtp2_message.h.teid != 0) { /* Cause is not "Context not found" */ - mme_ue = mme_ue_find_by_s11_local_teid(gtp_message.h.teid); + mme_ue = mme_ue_find_by_s11_local_teid(gtp2_message.h.teid); } else if (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 @@ -706,69 +706,60 @@ mme_ue = mme_ue_find_by_s11_local_teid(xact->local_teid); } - switch (gtp_message.h.type) { + switch (gtp2_message.h.type) { case OGS_GTP2_ECHO_REQUEST_TYPE: - mme_s11_handle_echo_request(xact, >p_message.echo_request); + mme_s11_handle_echo_request(xact, >p2_message); break; case OGS_GTP2_ECHO_RESPONSE_TYPE: - mme_s11_handle_echo_response(xact, >p_message.echo_response); + mme_s11_handle_echo_response(xact, >p2_message); break; case OGS_GTP2_CREATE_SESSION_RESPONSE_TYPE: - if (!gtp_message.h.teid_presence) ogs_error("No TEID"); - mme_s11_handle_create_session_response( - xact, mme_ue, >p_message.create_session_response); + if (!gtp2_message.h.teid_presence) ogs_error("No TEID"); + mme_s11_handle_create_session_response(xact, mme_ue, >p2_message); break; case OGS_GTP2_MODIFY_BEARER_RESPONSE_TYPE: - if (!gtp_message.h.teid_presence) ogs_error("No TEID"); - mme_s11_handle_modify_bearer_response( - xact, mme_ue, >p_message.modify_bearer_response); + if (!gtp2_message.h.teid_presence) ogs_error("No TEID"); + mme_s11_handle_modify_bearer_response(xact, mme_ue, >p2_message); break; case OGS_GTP2_DELETE_SESSION_RESPONSE_TYPE: - if (!gtp_message.h.teid_presence) ogs_error("No TEID"); - mme_s11_handle_delete_session_response( - xact, mme_ue, >p_message.delete_session_response); + if (!gtp2_message.h.teid_presence) ogs_error("No TEID"); + mme_s11_handle_delete_session_response(xact, mme_ue, >p2_message); break; case OGS_GTP2_CREATE_BEARER_REQUEST_TYPE: - mme_s11_handle_create_bearer_request( - xact, mme_ue, >p_message.create_bearer_request); + mme_s11_handle_create_bearer_request(xact, mme_ue, >p2_message); break; case OGS_GTP2_UPDATE_BEARER_REQUEST_TYPE: - mme_s11_handle_update_bearer_request( - xact, mme_ue, >p_message.update_bearer_request); + mme_s11_handle_update_bearer_request(xact, mme_ue, >p2_message); break; case OGS_GTP2_DELETE_BEARER_REQUEST_TYPE: - mme_s11_handle_delete_bearer_request( - xact, mme_ue, >p_message.delete_bearer_request); + mme_s11_handle_delete_bearer_request(xact, mme_ue, >p2_message); break; case OGS_GTP2_RELEASE_ACCESS_BEARERS_RESPONSE_TYPE: - if (!gtp_message.h.teid_presence) ogs_error("No TEID"); + if (!gtp2_message.h.teid_presence) ogs_error("No TEID"); mme_s11_handle_release_access_bearers_response( - xact, mme_ue, >p_message.release_access_bearers_response); + xact, mme_ue, >p2_message); break; case OGS_GTP2_DOWNLINK_DATA_NOTIFICATION_TYPE: mme_s11_handle_downlink_data_notification( - xact, mme_ue, >p_message.downlink_data_notification); + xact, mme_ue, >p2_message); break; case OGS_GTP2_CREATE_INDIRECT_DATA_FORWARDING_TUNNEL_RESPONSE_TYPE: - if (!gtp_message.h.teid_presence) ogs_error("No TEID"); + if (!gtp2_message.h.teid_presence) ogs_error("No TEID"); mme_s11_handle_create_indirect_data_forwarding_tunnel_response( - xact, mme_ue, - >p_message.create_indirect_data_forwarding_tunnel_response); + xact, mme_ue, >p2_message); break; case OGS_GTP2_DELETE_INDIRECT_DATA_FORWARDING_TUNNEL_RESPONSE_TYPE: - if (!gtp_message.h.teid_presence) ogs_error("No TEID"); + if (!gtp2_message.h.teid_presence) ogs_error("No TEID"); mme_s11_handle_delete_indirect_data_forwarding_tunnel_response( - xact, mme_ue, - >p_message.delete_indirect_data_forwarding_tunnel_response); + xact, mme_ue, >p2_message); break; case OGS_GTP2_BEARER_RESOURCE_FAILURE_INDICATION_TYPE: - if (!gtp_message.h.teid_presence) ogs_error("No TEID"); + if (!gtp2_message.h.teid_presence) ogs_error("No TEID"); mme_s11_handle_bearer_resource_failure_indication( - xact, mme_ue, - >p_message.bearer_resource_failure_indication); + xact, mme_ue, >p2_message); break; default: - ogs_warn("Not implemented(type:%d)", gtp_message.h.type); + ogs_warn("Not implemented(type:%d)", gtp2_message.h.type); break; } ogs_pkbuf_free(pkbuf);
View file
open5gs_2.7.0.126.eb2b.202404042026.tar.xz/src/sgwc/pfcp-sm.c -> open5gs_2.7.0.128.30648.202404052026.tar.xz/src/sgwc/pfcp-sm.c
Changed
@@ -305,8 +305,7 @@ sess->sgwu_sxa_seid = be64toh(up_f_seid->seid); } else { sgwc_sxa_handle_session_establishment_response( - sess, xact, e->gtp_message, - &message->pfcp_session_establishment_response); + sess, xact, e->gtp_message, message); } break; @@ -314,23 +313,20 @@ 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); + sess, xact, e->gtp_message, message); break; 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); + sess, xact, e->gtp_message, message); break; 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); + sgwc_sxa_handle_session_report_request(sess, xact, message); break; default:
View file
open5gs_2.7.0.126.eb2b.202404042026.tar.xz/src/sgwc/s11-handler.c -> open5gs_2.7.0.128.30648.202404052026.tar.xz/src/sgwc/s11-handler.c
Changed
@@ -174,7 +174,7 @@ if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) { ogs_gtp_send_error_message( - s11_xact, sgwc_ue ? sgwc_ue->mme_s11_teid : 0, + s11_xact, sgwc_ue ? sgwc_ue->mme_s11_teid : message->h.teid, OGS_GTP2_CREATE_SESSION_RESPONSE_TYPE, cause_value); return; } @@ -215,7 +215,7 @@ if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) { ogs_gtp_send_error_message( - s11_xact, sgwc_ue ? sgwc_ue->mme_s11_teid : 0, + s11_xact, sgwc_ue ? sgwc_ue->mme_s11_teid : message->h.teid, OGS_GTP2_CREATE_SESSION_RESPONSE_TYPE, cause_value); return; } @@ -263,7 +263,7 @@ ogs_assert(sess->pfcp_node); if (!OGS_FSM_CHECK(&sess->pfcp_node->sm, sgwc_pfcp_state_associated)) { ogs_gtp_send_error_message( - s11_xact, sgwc_ue ? sgwc_ue->mme_s11_teid : 0, + s11_xact, sgwc_ue ? sgwc_ue->mme_s11_teid : message->h.teid, OGS_GTP2_CREATE_SESSION_RESPONSE_TYPE, OGS_GTP2_CAUSE_REMOTE_PEER_NOT_RESPONDING); return; @@ -424,7 +424,7 @@ if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) { ogs_gtp_send_error_message( - s11_xact, sgwc_ue ? sgwc_ue->mme_s11_teid : 0, + s11_xact, sgwc_ue ? sgwc_ue->mme_s11_teid : message->h.teid, OGS_GTP2_MODIFY_BEARER_RESPONSE_TYPE, cause_value); return; } @@ -532,7 +532,7 @@ if (i == 0) { ogs_error("No Bearer"); ogs_gtp_send_error_message( - s11_xact, sgwc_ue ? sgwc_ue->mme_s11_teid : 0, + s11_xact, sgwc_ue ? sgwc_ue->mme_s11_teid : message->h.teid, OGS_GTP2_MODIFY_BEARER_RESPONSE_TYPE, cause_value); return; } @@ -610,7 +610,7 @@ if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) { ogs_gtp_send_error_message( - s11_xact, sgwc_ue ? sgwc_ue->mme_s11_teid : 0, + s11_xact, sgwc_ue ? sgwc_ue->mme_s11_teid : message->h.teid, OGS_GTP2_DELETE_SESSION_RESPONSE_TYPE, cause_value); return; } @@ -630,7 +630,7 @@ indication->scope_indication == 1) { ogs_error("Invalid Indication"); ogs_gtp_send_error_message( - s11_xact, sgwc_ue ? sgwc_ue->mme_s11_teid : 0, + s11_xact, sgwc_ue ? sgwc_ue->mme_s11_teid : message->h.teid, OGS_GTP2_DELETE_SESSION_RESPONSE_TYPE, OGS_GTP2_CAUSE_INVALID_MESSAGE_FORMAT); return; @@ -1129,7 +1129,7 @@ if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) { ogs_gtp_send_error_message( - s11_xact, sgwc_ue ? sgwc_ue->mme_s11_teid : 0, + s11_xact, sgwc_ue ? sgwc_ue->mme_s11_teid : message->h.teid, OGS_GTP2_RELEASE_ACCESS_BEARERS_RESPONSE_TYPE, cause_value); return; } @@ -1236,7 +1236,7 @@ if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) { ogs_gtp_send_error_message( - s11_xact, sgwc_ue ? sgwc_ue->mme_s11_teid : 0, + s11_xact, sgwc_ue ? sgwc_ue->mme_s11_teid : message->h.teid, OGS_GTP2_CREATE_INDIRECT_DATA_FORWARDING_TUNNEL_RESPONSE_TYPE, cause_value); return; @@ -1254,7 +1254,7 @@ if (req->bearer_contextsi.eps_bearer_id.presence == 0) { ogs_error("No EBI"); ogs_gtp_send_error_message( - s11_xact, sgwc_ue ? sgwc_ue->mme_s11_teid : 0, + s11_xact, sgwc_ue ? sgwc_ue->mme_s11_teid : message->h.teid, OGS_GTP2_CREATE_INDIRECT_DATA_FORWARDING_TUNNEL_RESPONSE_TYPE, OGS_GTP2_CAUSE_MANDATORY_IE_MISSING); return; @@ -1277,7 +1277,7 @@ rv = ogs_gtp2_f_teid_to_ip(req_teid, &tunnel->remote_ip); if (rv != OGS_OK) { ogs_gtp_send_error_message(s11_xact, - sgwc_ue ? sgwc_ue->mme_s11_teid : 0, + sgwc_ue ? sgwc_ue->mme_s11_teid : message->h.teid, OGS_GTP2_CREATE_INDIRECT_DATA_FORWARDING_TUNNEL_RESPONSE_TYPE, OGS_GTP2_CAUSE_MANDATORY_IE_MISSING); return; @@ -1312,7 +1312,7 @@ rv = ogs_gtp2_f_teid_to_ip(req_teid, &tunnel->remote_ip); if (rv != OGS_OK) { ogs_gtp_send_error_message(s11_xact, - sgwc_ue ? sgwc_ue->mme_s11_teid : 0, + sgwc_ue ? sgwc_ue->mme_s11_teid : message->h.teid, OGS_GTP2_CREATE_INDIRECT_DATA_FORWARDING_TUNNEL_RESPONSE_TYPE, OGS_GTP2_CAUSE_MANDATORY_IE_MISSING); return; @@ -1346,12 +1346,13 @@ void sgwc_s11_handle_delete_indirect_data_forwarding_tunnel_request( sgwc_ue_t *sgwc_ue, ogs_gtp_xact_t *s11_xact, - ogs_pkbuf_t *gtpbuf, ogs_gtp2_message_t *recv_message) + ogs_pkbuf_t *gtpbuf, ogs_gtp2_message_t *message) { sgwc_sess_t *sess = NULL; uint8_t cause_value = 0; ogs_assert(s11_xact); + ogs_assert(message); ogs_debug("Delete Indirect Data Forwarding Tunnel Request"); @@ -1367,7 +1368,8 @@ if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) { ogs_gtp_send_error_message( - s11_xact, sgwc_ue ? sgwc_ue->mme_s11_teid : 0, + s11_xact, + sgwc_ue ? sgwc_ue->mme_s11_teid : message->h.teid, OGS_GTP2_DELETE_INDIRECT_DATA_FORWARDING_TUNNEL_RESPONSE_TYPE, cause_value); return; @@ -1442,7 +1444,7 @@ if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) { ogs_gtp_send_error_message( - s11_xact, sgwc_ue ? sgwc_ue->mme_s11_teid : 0, + s11_xact, sgwc_ue ? sgwc_ue->mme_s11_teid : message->h.teid, OGS_GTP2_BEARER_RESOURCE_FAILURE_INDICATION_TYPE, cause_value); return; } @@ -1463,7 +1465,7 @@ if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) { ogs_gtp_send_error_message( - s11_xact, sgwc_ue ? sgwc_ue->mme_s11_teid : 0, + s11_xact, sgwc_ue ? sgwc_ue->mme_s11_teid : message->h.teid, OGS_GTP2_BEARER_RESOURCE_FAILURE_INDICATION_TYPE, cause_value); return; }
View file
open5gs_2.7.0.126.eb2b.202404042026.tar.xz/src/sgwc/s5c-handler.c -> open5gs_2.7.0.128.30648.202404052026.tar.xz/src/sgwc/s5c-handler.c
Changed
@@ -573,7 +573,8 @@ } if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) { - ogs_gtp_send_error_message(s5c_xact, sess ? sess->pgw_s5c_teid : 0, + ogs_gtp_send_error_message(s5c_xact, + sess ? sess->pgw_s5c_teid : message->h.teid, OGS_GTP2_CREATE_BEARER_RESPONSE_TYPE, cause_value); return; } @@ -601,7 +602,8 @@ } if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) { - ogs_gtp_send_error_message(s5c_xact, sess ? sess->pgw_s5c_teid : 0, + ogs_gtp_send_error_message(s5c_xact, + sess ? sess->pgw_s5c_teid : message->h.teid, OGS_GTP2_CREATE_BEARER_RESPONSE_TYPE, cause_value); return; } @@ -631,7 +633,8 @@ rv = ogs_gtp2_f_teid_to_ip(pgw_s5u_teid, &ul_tunnel->remote_ip); if (rv != OGS_OK) { - ogs_gtp_send_error_message(s5c_xact, sess ? sess->pgw_s5c_teid : 0, + ogs_gtp_send_error_message(s5c_xact, + sess ? sess->pgw_s5c_teid : message->h.teid, OGS_GTP2_CREATE_BEARER_RESPONSE_TYPE, OGS_GTP2_CAUSE_MANDATORY_IE_MISSING); return; @@ -709,7 +712,8 @@ } if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) { - ogs_gtp_send_error_message(s5c_xact, sess ? sess->pgw_s5c_teid : 0, + ogs_gtp_send_error_message(s5c_xact, + sess ? sess->pgw_s5c_teid : message->h.teid, OGS_GTP2_UPDATE_BEARER_RESPONSE_TYPE, cause_value); return; } @@ -850,7 +854,8 @@ } if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) { - ogs_gtp_send_error_message(s5c_xact, sess ? sess->pgw_s5c_teid : 0, + ogs_gtp_send_error_message(s5c_xact, + sess ? sess->pgw_s5c_teid : message->h.teid, OGS_GTP2_DELETE_BEARER_RESPONSE_TYPE, cause_value); return; }
View file
open5gs_2.7.0.126.eb2b.202404042026.tar.xz/src/sgwc/sxa-handler.c -> open5gs_2.7.0.128.30648.202404052026.tar.xz/src/sgwc/sxa-handler.c
Changed
@@ -127,7 +127,7 @@ void sgwc_sxa_handle_session_establishment_response( sgwc_sess_t *sess, ogs_pfcp_xact_t *pfcp_xact, ogs_gtp2_message_t *recv_message, - ogs_pfcp_session_establishment_response_t *pfcp_rsp) + ogs_pfcp_message_t *pfcp_message) { int rv; uint8_t cause_value = 0; @@ -155,11 +155,13 @@ ogs_gtp2_indication_t *indication = NULL; + ogs_pfcp_session_establishment_response_t *pfcp_rsp = NULL; + ogs_debug("Session Establishment Response"); ogs_assert(pfcp_xact); - ogs_assert(pfcp_rsp); ogs_assert(recv_message); + ogs_assert(pfcp_message); create_session_request = &recv_message->create_session_request; ogs_assert(create_session_request); @@ -167,6 +169,9 @@ s11_xact = pfcp_xact->assoc_xact; ogs_assert(s11_xact); + pfcp_rsp = &pfcp_message->pfcp_session_establishment_response; + ogs_assert(pfcp_rsp); + ogs_pfcp_xact_commit(pfcp_xact); cause_value = OGS_GTP2_CAUSE_REQUEST_ACCEPTED; @@ -246,7 +251,8 @@ if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) { if (sess) sgwc_ue = sess->sgwc_ue; ogs_gtp_send_error_message( - s11_xact, sgwc_ue ? sgwc_ue->mme_s11_teid : 0, + s11_xact, + sgwc_ue ? sgwc_ue->mme_s11_teid : recv_message->h.teid, OGS_GTP2_CREATE_SESSION_RESPONSE_TYPE, cause_value); return; } @@ -270,7 +276,8 @@ if (dl_tunnel->local_addr == NULL && dl_tunnel->local_addr6 == NULL) { ogs_error("No UP F-TEID"); ogs_gtp_send_error_message( - s11_xact, sgwc_ue ? sgwc_ue->mme_s11_teid : 0, + s11_xact, + sgwc_ue ? sgwc_ue->mme_s11_teid : recv_message->h.teid, OGS_GTP2_CREATE_SESSION_RESPONSE_TYPE, OGS_GTP2_CAUSE_GRE_KEY_NOT_FOUND); return; @@ -444,7 +451,7 @@ void sgwc_sxa_handle_session_modification_response( sgwc_sess_t *sess, ogs_pfcp_xact_t *pfcp_xact, ogs_gtp2_message_t *recv_message, - ogs_pfcp_session_modification_response_t *pfcp_rsp) + ogs_pfcp_message_t *pfcp_message) { int i, rv, len = 0; uint8_t cause_value = 0; @@ -463,14 +470,19 @@ ogs_gtp2_cause_t cause; + ogs_pfcp_session_modification_response_t *pfcp_rsp = NULL; + ogs_debug("Session Modification Response"); ogs_assert(pfcp_xact); - ogs_assert(pfcp_rsp); + ogs_assert(pfcp_message); flags = pfcp_xact->modify_flags; ogs_assert(flags); + pfcp_rsp = &pfcp_message->pfcp_session_modification_response; + ogs_assert(pfcp_rsp); + cause_value = OGS_GTP2_CAUSE_REQUEST_ACCEPTED; if (flags & OGS_PFCP_MODIFY_SESSION) { @@ -597,12 +609,15 @@ } else if (flags & OGS_PFCP_MODIFY_ACTIVATE) { + ogs_assert(recv_message); + if (flags & OGS_PFCP_MODIFY_UL_ONLY) { s11_xact = pfcp_xact->assoc_xact; ogs_assert(s11_xact); ogs_gtp_send_error_message( - s11_xact, sgwc_ue ? sgwc_ue->mme_s11_teid : 0, + s11_xact, + sgwc_ue ? sgwc_ue->mme_s11_teid : recv_message->h.teid, OGS_GTP2_CREATE_SESSION_RESPONSE_TYPE, cause_value); } else if (flags & OGS_PFCP_MODIFY_DL_ONLY) { @@ -610,19 +625,26 @@ ogs_assert(s11_xact); ogs_gtp_send_error_message( - s11_xact, sgwc_ue ? sgwc_ue->mme_s11_teid : 0, + s11_xact, + sgwc_ue ? sgwc_ue->mme_s11_teid : recv_message->h.teid, OGS_GTP2_MODIFY_BEARER_RESPONSE_TYPE, cause_value); } else { ogs_fatal("Invalid modify_flags0x%llx", (long long)flags); ogs_assert_if_reached(); } } else if (flags & OGS_PFCP_MODIFY_DEACTIVATE) { - s11_xact = pfcp_xact->assoc_xact; - ogs_assert(s11_xact); + if (flags & OGS_PFCP_MODIFY_ERROR_INDICATION) { + } else { + ogs_assert(recv_message); - ogs_gtp_send_error_message( - s11_xact, sgwc_ue ? sgwc_ue->mme_s11_teid : 0, - OGS_GTP2_RELEASE_ACCESS_BEARERS_RESPONSE_TYPE, cause_value); + s11_xact = pfcp_xact->assoc_xact; + ogs_assert(s11_xact); + + ogs_gtp_send_error_message( + s11_xact, + sgwc_ue ? sgwc_ue->mme_s11_teid : recv_message->h.teid, + OGS_GTP2_RELEASE_ACCESS_BEARERS_RESPONSE_TYPE, cause_value); + } } ogs_pfcp_xact_commit(pfcp_xact); @@ -989,6 +1011,7 @@ s11_xact = pfcp_xact->assoc_xact; ogs_assert(s11_xact); + ogs_assert(recv_message); ogs_list_copy(&bearer_to_modify_list, &pfcp_xact->bearer_to_modify_list); @@ -1002,7 +1025,6 @@ ogs_gtp2_f_teid_t sgw_s1u_teidOGS_BEARER_PER_UE; int sgw_s1u_lenOGS_BEARER_PER_UE; - ogs_assert(recv_message); gtp_rsp = &recv_message->create_session_response; ogs_assert(gtp_rsp); @@ -1071,7 +1093,6 @@ ogs_gtp2_indication_t *indication = NULL; - ogs_assert(recv_message); gtp_req = &recv_message->modify_bearer_request; ogs_assert(gtp_req); @@ -1210,6 +1231,7 @@ } else { s11_xact = pfcp_xact->assoc_xact; ogs_assert(s11_xact); + ogs_assert(recv_message); ogs_pfcp_xact_commit(pfcp_xact); @@ -1260,7 +1282,7 @@ void sgwc_sxa_handle_session_deletion_response( sgwc_sess_t *sess, ogs_pfcp_xact_t *pfcp_xact, ogs_gtp2_message_t *gtp_message, - ogs_pfcp_session_deletion_response_t *pfcp_rsp) + ogs_pfcp_message_t *pfcp_message) { int rv; uint8_t cause_value = 0; @@ -1271,9 +1293,14 @@ ogs_gtp_xact_t *gtp_xact = NULL; ogs_pkbuf_t *pkbuf = NULL; + ogs_pfcp_session_deletion_response_t *pfcp_rsp = NULL; + ogs_debug("Session Deletion Response"); ogs_assert(pfcp_xact); + ogs_assert(pfcp_message); + + pfcp_rsp = &pfcp_message->pfcp_session_deletion_response; ogs_assert(pfcp_rsp); cause_value = OGS_GTP2_CAUSE_REQUEST_ACCEPTED; @@ -1315,7 +1342,7 @@ * 2. SMF sends Delete Session Response to SGW/MME. */ if (sess) sgwc_ue = sess->sgwc_ue; - teid = sgwc_ue ? sgwc_ue->mme_s11_teid : 0; + teid = sgwc_ue ? sgwc_ue->mme_s11_teid : gtp_message->h.teid; break; case OGS_GTP2_DELETE_BEARER_RESPONSE_TYPE: /* @@ -1385,7 +1412,7 @@
View file
open5gs_2.7.0.126.eb2b.202404042026.tar.xz/src/sgwc/sxa-handler.h -> open5gs_2.7.0.128.30648.202404052026.tar.xz/src/sgwc/sxa-handler.h
Changed
@@ -29,18 +29,18 @@ void sgwc_sxa_handle_session_establishment_response( sgwc_sess_t *sess, ogs_pfcp_xact_t *pfcp_xact, ogs_gtp2_message_t *recv_message, - ogs_pfcp_session_establishment_response_t *pfcp_rsp); + ogs_pfcp_message_t *pfcp_message); void sgwc_sxa_handle_session_modification_response( sgwc_sess_t *sess, ogs_pfcp_xact_t *pfcp_xact, ogs_gtp2_message_t *recv_message, - ogs_pfcp_session_modification_response_t *pfcp_rsp); + ogs_pfcp_message_t *pfcp_message); void sgwc_sxa_handle_session_deletion_response( sgwc_sess_t *sess, ogs_pfcp_xact_t *pfcp_xact, ogs_gtp2_message_t *gtp_message, - ogs_pfcp_session_deletion_response_t *pfcp_rsp); + ogs_pfcp_message_t *pfcp_message); void sgwc_sxa_handle_session_report_request( sgwc_sess_t *sess, ogs_pfcp_xact_t *pfcp_xact, - ogs_pfcp_session_report_request_t *pfcp_req); + ogs_pfcp_message_t *pfcp_message); #ifdef __cplusplus }
View file
open5gs_2.7.0.126.eb2b.202404042026.tar.xz/src/sgwu/pfcp-sm.c -> open5gs_2.7.0.128.30648.202404052026.tar.xz/src/sgwu/pfcp-sm.c
Changed
@@ -280,20 +280,16 @@ sess = sgwu_sess_add_by_message(message); if (sess) OGS_SETUP_PFCP_NODE(sess, node); - sgwu_sxa_handle_session_establishment_request( - sess, xact, &message->pfcp_session_establishment_request); + sgwu_sxa_handle_session_establishment_request(sess, xact, message); break; case OGS_PFCP_SESSION_MODIFICATION_REQUEST_TYPE: - sgwu_sxa_handle_session_modification_request( - sess, xact, &message->pfcp_session_modification_request); + sgwu_sxa_handle_session_modification_request(sess, xact, message); break; case OGS_PFCP_SESSION_DELETION_REQUEST_TYPE: - sgwu_sxa_handle_session_deletion_request( - sess, xact, &message->pfcp_session_deletion_request); + sgwu_sxa_handle_session_deletion_request(sess, xact, message); break; case OGS_PFCP_SESSION_REPORT_RESPONSE_TYPE: - sgwu_sxa_handle_session_report_response( - sess, xact, &message->pfcp_session_report_response); + sgwu_sxa_handle_session_report_response(sess, xact, message); break; default: ogs_error("Not implemented PFCP message type%d",
View file
open5gs_2.7.0.126.eb2b.202404042026.tar.xz/src/sgwu/sxa-handler.c -> open5gs_2.7.0.128.30648.202404052026.tar.xz/src/sgwu/sxa-handler.c
Changed
@@ -22,8 +22,7 @@ #include "sxa-handler.h" void sgwu_sxa_handle_session_establishment_request( - sgwu_sess_t *sess, ogs_pfcp_xact_t *xact, - ogs_pfcp_session_establishment_request_t *req) + sgwu_sess_t *sess, ogs_pfcp_xact_t *xact, ogs_pfcp_message_t *message) { ogs_pfcp_pdr_t *pdr = NULL; ogs_pfcp_far_t *far = NULL; @@ -36,7 +35,11 @@ ogs_pfcp_sereq_flags_t sereq_flags; bool restoration_indication = false; + ogs_pfcp_session_establishment_request_t *req = NULL; + ogs_assert(xact); + ogs_assert(message); + req = &message->pfcp_session_establishment_request; ogs_assert(req); ogs_debug("Session Establishment Request"); @@ -45,7 +48,8 @@ if (!sess) { ogs_error("No Context"); - ogs_pfcp_send_error_message(xact, 0, + ogs_pfcp_send_error_message( + xact, sess ? sess->sgwc_sxa_f_seid.seid : message->h.seid, OGS_PFCP_SESSION_ESTABLISHMENT_RESPONSE_TYPE, OGS_PFCP_CAUSE_MANDATORY_IE_MISSING, 0); return; @@ -142,14 +146,14 @@ cleanup: ogs_pfcp_sess_clear(&sess->pfcp); - ogs_pfcp_send_error_message(xact, sess ? sess->sgwu_sxa_seid : 0, + ogs_pfcp_send_error_message( + xact, sess ? sess->sgwc_sxa_f_seid.seid : message->h.seid, OGS_PFCP_SESSION_ESTABLISHMENT_RESPONSE_TYPE, cause_value, offending_ie_value); } void sgwu_sxa_handle_session_modification_request( - sgwu_sess_t *sess, ogs_pfcp_xact_t *xact, - ogs_pfcp_session_modification_request_t *req) + sgwu_sess_t *sess, ogs_pfcp_xact_t *xact, ogs_pfcp_message_t *message) { ogs_pfcp_pdr_t *pdr = NULL; ogs_pfcp_far_t *far = NULL; @@ -159,7 +163,11 @@ uint8_t offending_ie_value = 0; int i; + ogs_pfcp_session_modification_request_t *req = NULL; + ogs_assert(xact); + ogs_assert(message); + req = &message->pfcp_session_modification_request; ogs_assert(req); ogs_debug("Session Modification Request"); @@ -168,7 +176,8 @@ if (!sess) { ogs_error("No Context"); - ogs_pfcp_send_error_message(xact, 0, + ogs_pfcp_send_error_message( + xact, sess ? sess->sgwc_sxa_f_seid.seid : message->h.seid, OGS_PFCP_SESSION_MODIFICATION_RESPONSE_TYPE, OGS_PFCP_CAUSE_SESSION_CONTEXT_NOT_FOUND, 0); return; @@ -309,23 +318,28 @@ cleanup: ogs_pfcp_sess_clear(&sess->pfcp); - ogs_pfcp_send_error_message(xact, sess ? sess->sgwu_sxa_seid : 0, + ogs_pfcp_send_error_message( + xact, sess ? sess->sgwc_sxa_f_seid.seid : message->h.seid, OGS_PFCP_SESSION_MODIFICATION_RESPONSE_TYPE, cause_value, offending_ie_value); } void sgwu_sxa_handle_session_deletion_request( - sgwu_sess_t *sess, ogs_pfcp_xact_t *xact, - ogs_pfcp_session_deletion_request_t *req) + sgwu_sess_t *sess, ogs_pfcp_xact_t *xact, ogs_pfcp_message_t *message) { + ogs_pfcp_session_deletion_request_t *req = NULL; + ogs_assert(xact); + ogs_assert(message); + req = &message->pfcp_session_deletion_request; ogs_assert(req); ogs_debug("Session Deletion Request"); if (!sess) { ogs_error("No Context"); - ogs_pfcp_send_error_message(xact, 0, + ogs_pfcp_send_error_message( + xact, sess ? sess->sgwc_sxa_f_seid.seid : message->h.seid, OGS_PFCP_SESSION_DELETION_RESPONSE_TYPE, OGS_PFCP_CAUSE_SESSION_CONTEXT_NOT_FOUND, 0); return; @@ -339,12 +353,15 @@ } void sgwu_sxa_handle_session_report_response( - sgwu_sess_t *sess, ogs_pfcp_xact_t *xact, - ogs_pfcp_session_report_response_t *rsp) + sgwu_sess_t *sess, ogs_pfcp_xact_t *xact, ogs_pfcp_message_t *message) { uint8_t cause_value = 0; + ogs_pfcp_session_report_response_t *rsp = NULL; + ogs_assert(xact); + ogs_assert(message); + rsp = &message->pfcp_session_report_response; ogs_assert(rsp); ogs_pfcp_xact_commit(xact);
View file
open5gs_2.7.0.126.eb2b.202404042026.tar.xz/src/sgwu/sxa-handler.h -> open5gs_2.7.0.128.30648.202404052026.tar.xz/src/sgwu/sxa-handler.h
Changed
@@ -27,18 +27,14 @@ #endif void sgwu_sxa_handle_session_establishment_request( - sgwu_sess_t *sess, ogs_pfcp_xact_t *xact, - ogs_pfcp_session_establishment_request_t *req); + sgwu_sess_t *sess, ogs_pfcp_xact_t *xact, ogs_pfcp_message_t *message); void sgwu_sxa_handle_session_modification_request( - sgwu_sess_t *sess, ogs_pfcp_xact_t *xact, - ogs_pfcp_session_modification_request_t *req); + sgwu_sess_t *sess, ogs_pfcp_xact_t *xact, ogs_pfcp_message_t *message); void sgwu_sxa_handle_session_deletion_request( - sgwu_sess_t *sess, ogs_pfcp_xact_t *xact, - ogs_pfcp_session_deletion_request_t *req); + sgwu_sess_t *sess, ogs_pfcp_xact_t *xact, ogs_pfcp_message_t *message); void sgwu_sxa_handle_session_report_response( - sgwu_sess_t *sess, ogs_pfcp_xact_t *xact, - ogs_pfcp_session_report_response_t *rsp); + sgwu_sess_t *sess, ogs_pfcp_xact_t *xact, ogs_pfcp_message_t *message); #ifdef __cplusplus }
View file
open5gs_2.7.0.126.eb2b.202404042026.tar.xz/src/smf/gsm-sm.c -> open5gs_2.7.0.128.30648.202404052026.tar.xz/src/smf/gsm-sm.c
Changed
@@ -218,8 +218,7 @@ switch(gtp2_message->h.type) { case OGS_GTP2_CREATE_SESSION_REQUEST_TYPE: gtp2_cause = smf_s5c_handle_create_session_request(sess, - e->gtp_xact, - &e->gtp2_message->create_session_request); + e->gtp_xact, gtp2_message); if (gtp2_cause != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) { send_gtp_create_err_msg(sess, e->gtp_xact, gtp2_cause); return; @@ -337,6 +336,7 @@ ogs_diam_gy_message_t *gy_message = NULL; ogs_diam_gx_message_t *gx_message = NULL; uint32_t diam_err; + bool need_gy_terminate = false; ogs_assert(s); ogs_assert(e); @@ -392,7 +392,7 @@ case OGS_DIAM_GY_CC_REQUEST_TYPE_INITIAL_REQUEST: ogs_assert(e->gtp_xact); diam_err = smf_gy_handle_cca_initial_request(sess, - gy_message, e->gtp_xact); + gy_message, e->gtp_xact, &need_gy_terminate); sess->sm_data.gy_ccr_init_in_flight = false; sess->sm_data.gy_cca_init_err = diam_err; goto test_can_proceed; @@ -422,8 +422,16 @@ smf_epc_pfcp_send_session_establishment_request( sess, e->gtp_xact, 0)); } else { - /* FIXME: tear down Gx/Gy session - * if its sm_data.*init_err == ER_DIAMETER_SUCCESS */ + /* Tear down Gx/Gy session if its sm_data.*init_err == ER_DIAMETER_SUCCESS */ + if (sess->sm_data.gx_cca_init_err == ER_DIAMETER_SUCCESS) { + sess->sm_data.gx_ccr_term_in_flight = true; + smf_gx_send_ccr(sess, e->gtp_xact, OGS_DIAM_GX_CC_REQUEST_TYPE_TERMINATION_REQUEST); + } + if (smf_use_gy_iface() == 1 && + (sess->sm_data.gy_cca_init_err == ER_DIAMETER_SUCCESS || need_gy_terminate)) { + sess->sm_data.gy_ccr_term_in_flight = true; + smf_gy_send_ccr(sess, e->gtp_xact, OGS_DIAM_GY_CC_REQUEST_TYPE_TERMINATION_REQUEST); + } uint8_t gtp_cause = gtp_cause_from_diameter( e->gtp_xact->gtp_version, diam_err, NULL); send_gtp_create_err_msg(sess, e->gtp_xact, gtp_cause); @@ -612,8 +620,7 @@ ogs_assert(gtp_xact); pfcp_cause = smf_epc_n4_handle_session_establishment_response( - sess, pfcp_xact, - &pfcp_message->pfcp_session_establishment_response); + sess, pfcp_xact, pfcp_message); if (pfcp_cause != OGS_PFCP_CAUSE_REQUEST_ACCEPTED) { /* FIXME: tear down Gy and Gx */ gtp_cause = gtp_cause_from_pfcp( @@ -662,8 +669,7 @@ smf_bearer_binding(sess); } else { pfcp_cause = smf_5gc_n4_handle_session_establishment_response( - sess, pfcp_xact, - &pfcp_message->pfcp_session_establishment_response); + sess, pfcp_xact, pfcp_message); if (pfcp_cause != OGS_PFCP_CAUSE_REQUEST_ACCEPTED) { OGS_FSM_TRAN(s, smf_gsm_state_5gc_n1_n2_reject); return; @@ -775,8 +781,7 @@ switch(gtp2_message->h.type) { case OGS_GTP2_DELETE_SESSION_REQUEST_TYPE: gtp2_cause = smf_s5c_handle_delete_session_request( - sess, e->gtp_xact, - >p2_message->delete_session_request); + sess, e->gtp_xact, gtp2_message); if (gtp2_cause != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) { ogs_gtp2_send_error_message(e->gtp_xact, sess->sgw_s5c_teid, OGS_GTP2_DELETE_SESSION_RESPONSE_TYPE, gtp2_cause); @@ -786,7 +791,7 @@ break; case OGS_GTP2_DELETE_BEARER_RESPONSE_TYPE: release = smf_s5c_handle_delete_bearer_response( - sess, e->gtp_xact, &e->gtp2_message->delete_bearer_response); + sess, e->gtp_xact, gtp2_message); if (release) { e->gtp_xact = NULL; OGS_FSM_TRAN(s, smf_gsm_state_wait_pfcp_deletion); @@ -1301,8 +1306,7 @@ gtp_xact = pfcp_xact->assoc_xact; pfcp_cause = smf_epc_n4_handle_session_deletion_response( - sess, pfcp_xact, - &pfcp_message->pfcp_session_deletion_response); + sess, pfcp_xact, pfcp_message); if (pfcp_cause != OGS_PFCP_CAUSE_REQUEST_ACCEPTED) { /* FIXME: tear down Gy and Gx */ ogs_assert(gtp_xact); @@ -1325,8 +1329,7 @@ ogs_pfcp_xact_commit(pfcp_xact); status = smf_5gc_n4_handle_session_deletion_response( - sess, stream, trigger, - &pfcp_message->pfcp_session_deletion_response); + sess, stream, trigger, pfcp_message); if (status != OGS_SBI_HTTP_STATUS_OK) { ogs_error( "%d smf_5gc_n4_handle_session_deletion_response() "
View file
open5gs_2.7.0.126.eb2b.202404042026.tar.xz/src/smf/gy-handler.c -> open5gs_2.7.0.128.30648.202404052026.tar.xz/src/smf/gy-handler.c
Changed
@@ -113,24 +113,41 @@ } } -/* Returns ER_DIAMETER_SUCCESS on success, Diameter error code on failue. */ +/* Returns ER_DIAMETER_SUCCESS on success, Diameter error code on failue. + * Upon failure, CCR-Terminate is needed based on "need_termination" value (this + * may happen eg. if messaged RC is successful but MSCC RC is rejected). */ uint32_t smf_gy_handle_cca_initial_request( smf_sess_t *sess, ogs_diam_gy_message_t *gy_message, - ogs_gtp_xact_t *gtp_xact) + ogs_gtp_xact_t *gtp_xact, + bool *need_termination) { smf_bearer_t *bearer; ogs_assert(sess); ogs_assert(gy_message); ogs_assert(gtp_xact); + ogs_assert(need_termination); ogs_debug("Gy CCA Initial"); ogs_debug(" SGW_S5C_TEID0x%x PGW_S5C_TEID0x%x", sess->sgw_s5c_teid, sess->smf_n4_teid); - if (gy_message->result_code != ER_DIAMETER_SUCCESS) + *need_termination = false; + if (gy_message->result_code != ER_DIAMETER_SUCCESS) { + ogs_warn("Gy CCA Initial Diameter failure: res=%u", + gy_message->result_code); return gy_message->err ? *gy_message->err : ER_DIAMETER_AUTHENTICATION_REJECTED; + } + if (gy_message->cca.result_code != ER_DIAMETER_SUCCESS) { + ogs_warn("Gy CCA Initial Diameter Multiple-Services-Credit-Control Result-Code=%u", + gy_message->cca.result_code); + /* Message RC was successful but MSCC was rejected. The session needs to + * be tear down through CCR-T: */ + *need_termination = true; + return gy_message->cca.err ? *gy_message->cca.err : + ER_DIAMETER_AUTHENTICATION_REJECTED; + } bearer = smf_default_bearer_in_sess(sess); ogs_assert(bearer); @@ -173,8 +190,8 @@ sess->sgw_s5c_teid, sess->smf_n4_teid); if (gy_message->result_code != ER_DIAMETER_SUCCESS) { - ogs_warn("Gy CCA Update Diameter failure: res=%u err=%u", - gy_message->result_code, *gy_message->err); + ogs_warn("Gy CCA Update Diameter failure: Result-Code=%u", + gy_message->result_code); return gy_message->err ? *gy_message->err : ER_DIAMETER_AUTHENTICATION_REJECTED; }
View file
open5gs_2.7.0.126.eb2b.202404042026.tar.xz/src/smf/gy-handler.h -> open5gs_2.7.0.128.30648.202404052026.tar.xz/src/smf/gy-handler.h
Changed
@@ -29,7 +29,8 @@ uint32_t smf_gy_handle_cca_initial_request( smf_sess_t *sess, ogs_diam_gy_message_t *gy_message, - ogs_gtp_xact_t *gtp_xact); + ogs_gtp_xact_t *gtp_xact, + bool *need_termination); uint32_t smf_gy_handle_cca_update_request( smf_sess_t *sess, ogs_diam_gy_message_t *gy_message, ogs_pfcp_xact_t *pfcp_xact);
View file
open5gs_2.7.0.126.eb2b.202404042026.tar.xz/src/smf/n4-handler.c -> open5gs_2.7.0.128.30648.202404052026.tar.xz/src/smf/n4-handler.c
Changed
@@ -144,7 +144,7 @@ * other cause value on failure */ uint8_t smf_5gc_n4_handle_session_establishment_response( smf_sess_t *sess, ogs_pfcp_xact_t *xact, - ogs_pfcp_session_establishment_response_t *rsp) + ogs_pfcp_message_t *pfcp_message) { int i; @@ -156,8 +156,12 @@ ogs_pfcp_pdr_t *pdr = NULL; ogs_pfcp_far_t *far = NULL; + ogs_pfcp_session_establishment_response_t *rsp = NULL; + ogs_assert(sess); ogs_assert(xact); + ogs_assert(pfcp_message); + rsp = &pfcp_message->pfcp_session_establishment_response; ogs_assert(rsp); ogs_debug("Session Establishment Response 5gc"); @@ -240,18 +244,22 @@ void smf_5gc_n4_handle_session_modification_response( smf_sess_t *sess, ogs_pfcp_xact_t *xact, - ogs_pfcp_session_modification_response_t *rsp) + ogs_pfcp_message_t *pfcp_message) { int status = 0; uint64_t flags = 0; ogs_sbi_stream_t *stream = NULL; smf_bearer_t *qos_flow = NULL; + ogs_pfcp_session_modification_response_t *rsp = NULL; + OGS_LIST(pdr_to_create_list); ogs_debug("Session Modification Response 5gc"); ogs_assert(xact); + ogs_assert(pfcp_message); + rsp = &pfcp_message->pfcp_session_modification_response; ogs_assert(rsp); flags = xact->modify_flags; @@ -665,12 +673,16 @@ int smf_5gc_n4_handle_session_deletion_response( smf_sess_t *sess, ogs_sbi_stream_t *stream, int trigger, - ogs_pfcp_session_deletion_response_t *rsp) + ogs_pfcp_message_t *pfcp_message) { int status = 0; + ogs_pfcp_session_deletion_response_t *rsp = NULL; + ogs_debug("Session Deletion Response 5gc"); + ogs_assert(pfcp_message); + rsp = &pfcp_message->pfcp_session_deletion_response; ogs_assert(rsp); ogs_assert(trigger); @@ -725,7 +737,7 @@ * other cause value on failure */ uint8_t smf_epc_n4_handle_session_establishment_response( smf_sess_t *sess, ogs_pfcp_xact_t *xact, - ogs_pfcp_session_establishment_response_t *rsp) + ogs_pfcp_message_t *pfcp_message) { uint8_t cause_value = OGS_PFCP_CAUSE_REQUEST_ACCEPTED; @@ -733,8 +745,12 @@ ogs_pfcp_f_seid_t *up_f_seid = NULL; + ogs_pfcp_session_establishment_response_t *rsp = NULL; + ogs_assert(sess); ogs_assert(xact); + ogs_assert(pfcp_message); + rsp = &pfcp_message->pfcp_session_establishment_response; ogs_assert(rsp); ogs_debug("Session Establishment Response epc"); @@ -828,7 +844,7 @@ void smf_epc_n4_handle_session_modification_response( smf_sess_t *sess, ogs_pfcp_xact_t *xact, ogs_gtp2_message_t *recv_message, - ogs_pfcp_session_modification_response_t *rsp) + ogs_pfcp_message_t *pfcp_message) { int i; @@ -844,9 +860,13 @@ ogs_pfcp_pdr_t *pdr = NULL; ogs_pfcp_far_t *far = NULL; + ogs_pfcp_session_modification_response_t *rsp = NULL; + OGS_LIST(pdr_to_create_list); ogs_assert(xact); + ogs_assert(pfcp_message); + rsp = &pfcp_message->pfcp_session_modification_response; ogs_assert(rsp); ogs_debug("Session Modification Response epc"); @@ -1093,13 +1113,17 @@ uint8_t smf_epc_n4_handle_session_deletion_response( smf_sess_t *sess, ogs_pfcp_xact_t *xact, - ogs_pfcp_session_deletion_response_t *rsp) + ogs_pfcp_message_t *pfcp_message) { smf_bearer_t *bearer = NULL; unsigned int i; + ogs_pfcp_session_deletion_response_t *rsp = NULL; + ogs_assert(sess); ogs_assert(xact); + ogs_assert(pfcp_message); + rsp = &pfcp_message->pfcp_session_deletion_response; ogs_assert(rsp); ogs_debug("Session Deletion Response epc"); @@ -1149,7 +1173,7 @@ void smf_n4_handle_session_report_request( smf_sess_t *sess, ogs_pfcp_xact_t *pfcp_xact, - ogs_pfcp_session_report_request_t *pfcp_req) + ogs_pfcp_message_t *pfcp_message) { smf_ue_t *smf_ue = NULL; smf_bearer_t *qos_flow = NULL; @@ -1162,9 +1186,13 @@ uint16_t pdr_id = 0; unsigned int i; + ogs_pfcp_session_report_request_t *pfcp_req = NULL; + smf_metrics_inst_global_inc(SMF_METR_GLOB_CTR_SM_N4SESSIONREPORT); ogs_assert(pfcp_xact); + ogs_assert(pfcp_message); + pfcp_req = &pfcp_message->pfcp_session_report_request; ogs_assert(pfcp_req); ogs_debug("Session Report Request"); @@ -1182,7 +1210,8 @@ } if (cause_value != OGS_PFCP_CAUSE_REQUEST_ACCEPTED) { - ogs_pfcp_send_error_message(pfcp_xact, 0, + ogs_pfcp_send_error_message(pfcp_xact, + sess ? sess->upf_n4_seid : pfcp_message->h.seid, OGS_PFCP_SESSION_REPORT_RESPONSE_TYPE, cause_value, 0); return; @@ -1222,7 +1251,8 @@ if (paging_policy_indication_value) { ogs_warn("Not implement - " "Paging Policy Indication Value"); - ogs_pfcp_send_error_message(pfcp_xact, 0, + ogs_pfcp_send_error_message(pfcp_xact, + sess ? sess->upf_n4_seid : pfcp_message->h.seid, OGS_PFCP_SESSION_REPORT_RESPONSE_TYPE, OGS_PFCP_CAUSE_SERVICE_NOT_SUPPORTED, 0); return; @@ -1232,7 +1262,8 @@ qos_flow = smf_qos_flow_find_by_qfi(sess, qfi); if (!qos_flow) { ogs_error("Cannot find the QoS Flow%d", qfi); - ogs_pfcp_send_error_message(pfcp_xact, 0, + ogs_pfcp_send_error_message(pfcp_xact, + sess ? sess->upf_n4_seid : pfcp_message->h.seid, OGS_PFCP_SESSION_REPORT_RESPONSE_TYPE, OGS_PFCP_CAUSE_SESSION_CONTEXT_NOT_FOUND, 0); return; @@ -1257,7 +1288,8 @@ if (!pdr) { ogs_error("No Context"); - ogs_pfcp_send_error_message(pfcp_xact, 0, + ogs_pfcp_send_error_message(pfcp_xact, + sess ? sess->upf_n4_seid : pfcp_message->h.seid, OGS_PFCP_SESSION_REPORT_RESPONSE_TYPE, OGS_PFCP_CAUSE_SESSION_CONTEXT_NOT_FOUND, 0); return;
View file
open5gs_2.7.0.126.eb2b.202404042026.tar.xz/src/smf/n4-handler.h -> open5gs_2.7.0.128.30648.202404052026.tar.xz/src/smf/n4-handler.h
Changed
@@ -28,28 +28,28 @@ uint8_t smf_5gc_n4_handle_session_establishment_response( smf_sess_t *sess, ogs_pfcp_xact_t *xact, - ogs_pfcp_session_establishment_response_t *rsp); + ogs_pfcp_message_t *pfcp_message); void smf_5gc_n4_handle_session_modification_response( smf_sess_t *sess, ogs_pfcp_xact_t *xact, - ogs_pfcp_session_modification_response_t *rsp); + ogs_pfcp_message_t *pfcp_message); int smf_5gc_n4_handle_session_deletion_response( smf_sess_t *sess, ogs_sbi_stream_t *stream, int trigger, - ogs_pfcp_session_deletion_response_t *rsp); + ogs_pfcp_message_t *pfcp_message); uint8_t smf_epc_n4_handle_session_establishment_response( smf_sess_t *sess, ogs_pfcp_xact_t *xact, - ogs_pfcp_session_establishment_response_t *rsp); + ogs_pfcp_message_t *pfcp_message); void smf_epc_n4_handle_session_modification_response( smf_sess_t *sess, ogs_pfcp_xact_t *xact, ogs_gtp2_message_t *recv_message, - ogs_pfcp_session_modification_response_t *rsp); + ogs_pfcp_message_t *pfcp_message); uint8_t smf_epc_n4_handle_session_deletion_response( smf_sess_t *sess, ogs_pfcp_xact_t *xact, - ogs_pfcp_session_deletion_response_t *rsp); + ogs_pfcp_message_t *pfcp_message); void smf_n4_handle_session_report_request( smf_sess_t *sess, ogs_pfcp_xact_t *pfcp_xact, - ogs_pfcp_session_report_request_t *pfcp_req); + ogs_pfcp_message_t *pfcp_message); uint8_t gtp_cause_from_pfcp(uint8_t pfcp_cause, uint8_t gtp_version);
View file
open5gs_2.7.0.126.eb2b.202404042026.tar.xz/src/smf/pfcp-sm.c -> open5gs_2.7.0.128.30648.202404052026.tar.xz/src/smf/pfcp-sm.c
Changed
@@ -337,11 +337,10 @@ if (xact->epc) smf_epc_n4_handle_session_modification_response( - sess, xact, e->gtp2_message, - &message->pfcp_session_modification_response); + sess, xact, e->gtp2_message, message); else smf_5gc_n4_handle_session_modification_response( - sess, xact, &message->pfcp_session_modification_response); + sess, xact, message); break; case OGS_PFCP_SESSION_DELETION_RESPONSE_TYPE: @@ -371,7 +370,7 @@ if (!message->h.seid_presence) ogs_error("No SEID"); smf_n4_handle_session_report_request( - sess, xact, &message->pfcp_session_report_request); + sess, xact, message); break; default:
View file
open5gs_2.7.0.126.eb2b.202404042026.tar.xz/src/smf/s5c-handler.c -> open5gs_2.7.0.128.30648.202404052026.tar.xz/src/smf/s5c-handler.c
Changed
@@ -70,7 +70,7 @@ uint8_t smf_s5c_handle_create_session_request( smf_sess_t *sess, ogs_gtp_xact_t *xact, - ogs_gtp2_create_session_request_t *req) + ogs_gtp2_message_t *gtp2_message) { char buf1OGS_ADDRSTRLEN; char buf2OGS_ADDRSTRLEN; @@ -89,8 +89,11 @@ ogs_gtp2_ambr_t *ambr = NULL; uint16_t decoded = 0; + ogs_gtp2_create_session_request_t *req = NULL; + ogs_assert(sess); ogs_assert(xact); + req = >p2_message->create_session_request; ogs_assert(req); ogs_debug("Create Session Request"); @@ -104,7 +107,18 @@ if (req->sender_f_teid_for_control_plane.presence == 0) { ogs_error("No TEID"); cause_value = OGS_GTP2_CAUSE_MANDATORY_IE_MISSING; + } else { + /* Control Plane(DL) : SGW-S5C */ + sgw_s5c_teid = req->sender_f_teid_for_control_plane.data; + ogs_assert(sgw_s5c_teid); + sess->sgw_s5c_teid = be32toh(sgw_s5c_teid->teid); + rv = ogs_gtp2_f_teid_to_ip(sgw_s5c_teid, &sess->sgw_s5c_ip); + ogs_assert(rv == OGS_OK); + + ogs_debug(" SGW_S5C_TEID0x%x SMF_N4_TEID0x%x", + sess->sgw_s5c_teid, sess->smf_n4_teid); } + if (req->bearer_contexts_to_be_created0.presence == 0) { ogs_error("No Bearer"); cause_value = OGS_GTP2_CAUSE_MANDATORY_IE_MISSING; @@ -278,16 +292,6 @@ sess->ipv4 ? OGS_INET_NTOP(&sess->ipv4->addr, buf1) : "", sess->ipv6 ? OGS_INET6_NTOP(&sess->ipv6->addr, buf2) : ""); - /* Control Plane(DL) : SGW-S5C */ - sgw_s5c_teid = req->sender_f_teid_for_control_plane.data; - ogs_assert(sgw_s5c_teid); - sess->sgw_s5c_teid = be32toh(sgw_s5c_teid->teid); - rv = ogs_gtp2_f_teid_to_ip(sgw_s5c_teid, &sess->sgw_s5c_ip); - ogs_assert(rv == OGS_OK); - - ogs_debug(" SGW_S5C_TEID0x%x SMF_N4_TEID0x%x", - sess->sgw_s5c_teid, sess->smf_n4_teid); - /* Remove all previous bearer */ smf_bearer_remove_all(sess); @@ -422,11 +426,14 @@ uint8_t smf_s5c_handle_delete_session_request( smf_sess_t *sess, ogs_gtp_xact_t *xact, - ogs_gtp2_delete_session_request_t *req) + ogs_gtp2_message_t *gtp2_message) { + ogs_gtp2_delete_session_request_t *req = NULL; + ogs_debug("Delete Session Request"); ogs_assert(xact); + req = >p2_message->delete_session_request; ogs_assert(req); if (!ogs_diam_app_connected(OGS_DIAM_GX_APPLICATION_ID)) { @@ -479,7 +486,7 @@ void smf_s5c_handle_modify_bearer_request( smf_sess_t *sess, ogs_gtp_xact_t *gtp_xact, - ogs_pkbuf_t *gtpbuf, ogs_gtp2_modify_bearer_request_t *req) + ogs_pkbuf_t *gtpbuf, ogs_gtp2_message_t *gtp2_message) { int rv, i; uint8_t cause_value = 0; @@ -488,9 +495,13 @@ smf_ue_t *smf_ue = NULL; smf_bearer_t *bearer = NULL; + ogs_gtp2_modify_bearer_request_t *req = NULL; + ogs_debug("Modify Bearer Request"); ogs_assert(gtp_xact); + ogs_assert(gtp2_message); + req = >p2_message->modify_bearer_request; ogs_assert(req); /************************ @@ -504,7 +515,8 @@ } if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) { - ogs_gtp2_send_error_message(gtp_xact, sess ? sess->sgw_s5c_teid : 0, + ogs_gtp2_send_error_message(gtp_xact, + sess ? sess->sgw_s5c_teid : gtp2_message->h.teid, OGS_GTP2_MODIFY_BEARER_RESPONSE_TYPE, cause_value); return; } @@ -648,7 +660,7 @@ void smf_s5c_handle_create_bearer_response( smf_sess_t *sess, ogs_gtp_xact_t *xact, - ogs_gtp2_create_bearer_response_t *rsp) + ogs_gtp2_message_t *gtp2_message) { int rv; uint8_t cause_value; @@ -657,7 +669,10 @@ smf_bearer_t *bearer = NULL; ogs_pfcp_far_t *dl_far = NULL; + ogs_gtp2_create_bearer_response_t *rsp = NULL; + ogs_assert(sess); + rsp = >p2_message->create_bearer_response; ogs_assert(rsp); ogs_debug("Create Bearer Response"); @@ -822,7 +837,7 @@ void smf_s5c_handle_update_bearer_response( smf_sess_t *sess, ogs_gtp_xact_t *xact, - ogs_gtp2_update_bearer_response_t *rsp) + ogs_gtp2_message_t *gtp2_message) { int rv; uint8_t cause_value; @@ -831,7 +846,10 @@ uint64_t pfcp_flags = 0; smf_bearer_t *bearer = NULL; + ogs_gtp2_update_bearer_response_t *rsp = NULL; + ogs_assert(sess); + rsp = >p2_message->update_bearer_response; ogs_assert(rsp); ogs_debug("Update Bearer Response"); @@ -929,13 +947,16 @@ /* return true if entire session must be released */ bool smf_s5c_handle_delete_bearer_response( smf_sess_t *sess, ogs_gtp_xact_t *xact, - ogs_gtp2_delete_bearer_response_t *rsp) + ogs_gtp2_message_t *gtp2_message) { int rv; uint8_t cause_value; smf_bearer_t *bearer = NULL; + ogs_gtp2_delete_bearer_response_t *rsp = NULL; + ogs_assert(sess); + rsp = >p2_message->delete_bearer_response; ogs_assert(rsp); ogs_debug("Delete Bearer Response"); @@ -1132,7 +1153,7 @@ void smf_s5c_handle_bearer_resource_command( smf_sess_t *sess, ogs_gtp_xact_t *xact, - ogs_gtp2_bearer_resource_command_t *cmd) + ogs_gtp2_message_t *gtp2_message) { int rv; uint8_t cause_value = 0; @@ -1151,7 +1172,11 @@ int qos_update = 0; int tft_delete = 0; + ogs_gtp2_bearer_resource_command_t *cmd = NULL; + ogs_assert(xact); + ogs_assert(gtp2_message); + cmd = >p2_message->bearer_resource_command; ogs_assert(cmd); ogs_debug("Bearer Resource Command"); @@ -1186,7 +1211,8 @@ } if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) { - ogs_gtp2_send_error_message(xact, sess ? sess->sgw_s5c_teid : 0, + ogs_gtp2_send_error_message(xact, + sess ? sess->sgw_s5c_teid : gtp2_message->h.teid, OGS_GTP2_BEARER_RESOURCE_FAILURE_INDICATION_TYPE, cause_value); return; } @@ -1211,7 +1237,8 @@ } if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) { - ogs_gtp2_send_error_message(xact, sess ? sess->sgw_s5c_teid : 0,
View file
open5gs_2.7.0.126.eb2b.202404042026.tar.xz/src/smf/s5c-handler.h -> open5gs_2.7.0.128.30648.202404052026.tar.xz/src/smf/s5c-handler.h
Changed
@@ -33,25 +33,25 @@ uint8_t smf_s5c_handle_create_session_request( smf_sess_t *sess, ogs_gtp_xact_t *xact, - ogs_gtp2_create_session_request_t *req); + ogs_gtp2_message_t *gtp2_message); uint8_t smf_s5c_handle_delete_session_request( smf_sess_t *sess, ogs_gtp_xact_t *xact, - ogs_gtp2_delete_session_request_t *req); + ogs_gtp2_message_t *gtp2_message); void smf_s5c_handle_modify_bearer_request( smf_sess_t *sess, ogs_gtp_xact_t *xact, - ogs_pkbuf_t *gtpbuf, ogs_gtp2_modify_bearer_request_t *req); + ogs_pkbuf_t *gtpbuf, ogs_gtp2_message_t *gtp2_message); void smf_s5c_handle_create_bearer_response( smf_sess_t *sess, ogs_gtp_xact_t *xact, - ogs_gtp2_create_bearer_response_t *rsp); + ogs_gtp2_message_t *gtp2_message); void smf_s5c_handle_update_bearer_response( smf_sess_t *sess, ogs_gtp_xact_t *xact, - ogs_gtp2_update_bearer_response_t *rsp); + ogs_gtp2_message_t *gtp2_message); bool smf_s5c_handle_delete_bearer_response( smf_sess_t *sess, ogs_gtp_xact_t *xact, - ogs_gtp2_delete_bearer_response_t *rsp); + ogs_gtp2_message_t *gtp2_message); void smf_s5c_handle_bearer_resource_command( smf_sess_t *sess, ogs_gtp_xact_t *xact, - ogs_gtp2_bearer_resource_command_t *cmd); + ogs_gtp2_message_t *gtp2_message); #ifdef __cplusplus }
View file
open5gs_2.7.0.126.eb2b.202404042026.tar.xz/src/smf/smf-sm.c -> open5gs_2.7.0.128.30648.202404052026.tar.xz/src/smf/smf-sm.c
Changed
@@ -144,7 +144,7 @@ } if (!sess) { ogs_error("No Session"); - ogs_gtp2_send_error_message(gtp_xact, 0, + ogs_gtp2_send_error_message(gtp_xact, gtp2_message.h.teid, OGS_GTP2_CREATE_SESSION_RESPONSE_TYPE, OGS_GTP2_CAUSE_CONTEXT_NOT_FOUND); break; @@ -158,7 +158,7 @@ smf_metrics_inst_gtp_node_inc(smf_gnode->metrics, SMF_METR_GTP_NODE_CTR_S5C_RX_DELETESESSIONREQ); if (!sess) { ogs_error("No Session"); - ogs_gtp2_send_error_message(gtp_xact, 0, + ogs_gtp2_send_error_message(gtp_xact, gtp2_message.h.teid, OGS_GTP2_DELETE_SESSION_RESPONSE_TYPE, OGS_GTP2_CAUSE_CONTEXT_NOT_FOUND); break; @@ -169,17 +169,17 @@ case OGS_GTP2_MODIFY_BEARER_REQUEST_TYPE: if (!gtp2_message.h.teid_presence) ogs_error("No TEID"); smf_s5c_handle_modify_bearer_request( - sess, gtp_xact, recvbuf, >p2_message.modify_bearer_request); + sess, gtp_xact, recvbuf, >p2_message); break; case OGS_GTP2_CREATE_BEARER_RESPONSE_TYPE: if (!gtp2_message.h.teid_presence) ogs_error("No TEID"); smf_s5c_handle_create_bearer_response( - sess, gtp_xact, >p2_message.create_bearer_response); + sess, gtp_xact, >p2_message); break; case OGS_GTP2_UPDATE_BEARER_RESPONSE_TYPE: if (!gtp2_message.h.teid_presence) ogs_error("No TEID"); smf_s5c_handle_update_bearer_response( - sess, gtp_xact, >p2_message.update_bearer_response); + sess, gtp_xact, >p2_message); break; case OGS_GTP2_DELETE_BEARER_RESPONSE_TYPE: if (!gtp2_message.h.teid_presence) ogs_error("No TEID"); @@ -194,7 +194,7 @@ case OGS_GTP2_BEARER_RESOURCE_COMMAND_TYPE: if (!gtp2_message.h.teid_presence) ogs_error("No TEID"); smf_s5c_handle_bearer_resource_command( - sess, gtp_xact, >p2_message.bearer_resource_command); + sess, gtp_xact, >p2_message); break; default: ogs_warn("Not implemented(type:%d)", gtp2_message.h.type);
View file
open5gs_2.7.0.126.eb2b.202404042026.tar.xz/src/upf/n4-handler.c -> open5gs_2.7.0.128.30648.202404052026.tar.xz/src/upf/n4-handler.c
Changed
@@ -44,8 +44,7 @@ } void upf_n4_handle_session_establishment_request( - upf_sess_t *sess, ogs_pfcp_xact_t *xact, - ogs_pfcp_session_establishment_request_t *req) + upf_sess_t *sess, ogs_pfcp_xact_t *xact, ogs_pfcp_message_t *message) { ogs_pfcp_pdr_t *pdr = NULL; ogs_pfcp_far_t *far = NULL; @@ -58,9 +57,13 @@ ogs_pfcp_sereq_flags_t sereq_flags; bool restoration_indication = false; + ogs_pfcp_session_establishment_request_t *req = NULL; + upf_metrics_inst_global_inc(UPF_METR_GLOB_CTR_SM_N4SESSIONESTABREQ); ogs_assert(xact); + ogs_assert(message); + req = &message->pfcp_session_establishment_request; ogs_assert(req); ogs_debug("Session Establishment Request"); @@ -69,7 +72,8 @@ if (!sess) { ogs_error("No Context"); - ogs_pfcp_send_error_message(xact, 0, + ogs_pfcp_send_error_message( + xact, sess ? sess->smf_n4_f_seid.seid : message->h.seid, OGS_PFCP_SESSION_ESTABLISHMENT_RESPONSE_TYPE, OGS_PFCP_CAUSE_MANDATORY_IE_MISSING, 0); upf_metrics_inst_by_cause_add(OGS_PFCP_CAUSE_MANDATORY_IE_MISSING, @@ -214,14 +218,14 @@ upf_metrics_inst_by_cause_add(cause_value, UPF_METR_CTR_SM_N4SESSIONESTABFAIL, 1); ogs_pfcp_sess_clear(&sess->pfcp); - ogs_pfcp_send_error_message(xact, sess ? sess->smf_n4_f_seid.seid : 0, + ogs_pfcp_send_error_message( + xact, sess ? sess->smf_n4_f_seid.seid : message->h.seid, OGS_PFCP_SESSION_ESTABLISHMENT_RESPONSE_TYPE, cause_value, offending_ie_value); } void upf_n4_handle_session_modification_request( - upf_sess_t *sess, ogs_pfcp_xact_t *xact, - ogs_pfcp_session_modification_request_t *req) + upf_sess_t *sess, ogs_pfcp_xact_t *xact, ogs_pfcp_message_t *message) { ogs_pfcp_pdr_t *pdr = NULL; ogs_pfcp_far_t *far = NULL; @@ -231,7 +235,11 @@ uint8_t offending_ie_value = 0; int i; + ogs_pfcp_session_modification_request_t *req = NULL; + ogs_assert(xact); + ogs_assert(message); + req = &message->pfcp_session_modification_request; ogs_assert(req); ogs_debug("Session Modification Request"); @@ -240,7 +248,8 @@ if (!sess) { ogs_error("No Context"); - ogs_pfcp_send_error_message(xact, 0, + ogs_pfcp_send_error_message( + xact, sess ? sess->smf_n4_f_seid.seid : message->h.seid, OGS_PFCP_SESSION_MODIFICATION_RESPONSE_TYPE, OGS_PFCP_CAUSE_SESSION_CONTEXT_NOT_FOUND, 0); return; @@ -413,25 +422,30 @@ cleanup: ogs_pfcp_sess_clear(&sess->pfcp); - ogs_pfcp_send_error_message(xact, sess ? sess->smf_n4_f_seid.seid : 0, + ogs_pfcp_send_error_message( + xact, sess ? sess->smf_n4_f_seid.seid : message->h.seid, OGS_PFCP_SESSION_MODIFICATION_RESPONSE_TYPE, cause_value, offending_ie_value); } void upf_n4_handle_session_deletion_request( - upf_sess_t *sess, ogs_pfcp_xact_t *xact, - ogs_pfcp_session_deletion_request_t *req) + upf_sess_t *sess, ogs_pfcp_xact_t *xact, ogs_pfcp_message_t *message) { ogs_pfcp_qer_t *qer = NULL; + ogs_pfcp_session_deletion_request_t *req = NULL; + ogs_assert(xact); + ogs_assert(message); + req = &message->pfcp_session_deletion_request; ogs_assert(req); ogs_debug("Session Deletion Request"); if (!sess) { ogs_error("No Context"); - ogs_pfcp_send_error_message(xact, 0, + ogs_pfcp_send_error_message(xact, + sess ? sess->smf_n4_f_seid.seid : message->h.seid, OGS_PFCP_SESSION_DELETION_RESPONSE_TYPE, OGS_PFCP_CAUSE_SESSION_CONTEXT_NOT_FOUND, 0); return; @@ -446,12 +460,15 @@ } void upf_n4_handle_session_report_response( - upf_sess_t *sess, ogs_pfcp_xact_t *xact, - ogs_pfcp_session_report_response_t *rsp) + upf_sess_t *sess, ogs_pfcp_xact_t *xact, ogs_pfcp_message_t *message) { uint8_t cause_value = 0; + ogs_pfcp_session_report_response_t *rsp = NULL; + ogs_assert(xact); + ogs_assert(message); + rsp = &message->pfcp_session_report_response; ogs_assert(rsp); ogs_pfcp_xact_commit(xact);
View file
open5gs_2.7.0.126.eb2b.202404042026.tar.xz/src/upf/n4-handler.h -> open5gs_2.7.0.128.30648.202404052026.tar.xz/src/upf/n4-handler.h
Changed
@@ -27,18 +27,14 @@ #endif void upf_n4_handle_session_establishment_request( - upf_sess_t *sess, ogs_pfcp_xact_t *xact, - ogs_pfcp_session_establishment_request_t *req); + upf_sess_t *sess, ogs_pfcp_xact_t *xact, ogs_pfcp_message_t *message); void upf_n4_handle_session_modification_request( - upf_sess_t *sess, ogs_pfcp_xact_t *xact, - ogs_pfcp_session_modification_request_t *req); + upf_sess_t *sess, ogs_pfcp_xact_t *xact, ogs_pfcp_message_t *message); void upf_n4_handle_session_deletion_request( - upf_sess_t *sess, ogs_pfcp_xact_t *xact, - ogs_pfcp_session_deletion_request_t *req); + upf_sess_t *sess, ogs_pfcp_xact_t *xact, ogs_pfcp_message_t *message); void upf_n4_handle_session_report_response( - upf_sess_t *sess, ogs_pfcp_xact_t *xact, - ogs_pfcp_session_report_response_t *rsp); + upf_sess_t *sess, ogs_pfcp_xact_t *xact, ogs_pfcp_message_t *message); #ifdef __cplusplus }
View file
open5gs_2.7.0.126.eb2b.202404042026.tar.xz/src/upf/pfcp-sm.c -> open5gs_2.7.0.128.30648.202404052026.tar.xz/src/upf/pfcp-sm.c
Changed
@@ -284,20 +284,16 @@ sess = upf_sess_add_by_message(message); if (sess) OGS_SETUP_PFCP_NODE(sess, node); - upf_n4_handle_session_establishment_request( - sess, xact, &message->pfcp_session_establishment_request); + upf_n4_handle_session_establishment_request(sess, xact, message); break; case OGS_PFCP_SESSION_MODIFICATION_REQUEST_TYPE: - upf_n4_handle_session_modification_request( - sess, xact, &message->pfcp_session_modification_request); + upf_n4_handle_session_modification_request(sess, xact, message); break; case OGS_PFCP_SESSION_DELETION_REQUEST_TYPE: - upf_n4_handle_session_deletion_request( - sess, xact, &message->pfcp_session_deletion_request); + upf_n4_handle_session_deletion_request(sess, xact, message); break; case OGS_PFCP_SESSION_REPORT_RESPONSE_TYPE: - upf_n4_handle_session_report_response( - sess, xact, &message->pfcp_session_report_response); + upf_n4_handle_session_report_response(sess, xact, message); break; default: ogs_error("Not implemented PFCP message type%d",
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
.