Projects
osmocom:nightly
open5gs
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 35
View file
open5gs_2.4.9.202207310002.dsc -> open5gs_2.4.9.202208010002.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.9.202207310002 +Version: 2.4.9.202208010002 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: - a28d06d3784e02111024e83acffb24e88c535307 11458756 open5gs_2.4.9.202207310002.tar.xz + a740defa90081990499d5f345322dc46c1d587c9 11459464 open5gs_2.4.9.202208010002.tar.xz Checksums-Sha256: - 8200de17d2f92b549d22b01a3e9e26dbe44d07bcc652c193d4b031d3f6832079 11458756 open5gs_2.4.9.202207310002.tar.xz + faf3632dfe798867e1af3406f37ff1fb63950c520d8a7d31aa3368f5ea21c161 11459464 open5gs_2.4.9.202208010002.tar.xz Files: - 3e5f2bbe52529a7dc2756c92a7dfa591 11458756 open5gs_2.4.9.202207310002.tar.xz + 17b0b1058ee219daa11e61ab67950613 11459464 open5gs_2.4.9.202208010002.tar.xz
View file
open5gs_2.4.9.202207310002.tar.xz/debian/changelog -> open5gs_2.4.9.202208010002.tar.xz/debian/changelog
Changed
@@ -1,8 +1,8 @@ -open5gs (2.4.9.202207310002) UNRELEASED; urgency=medium +open5gs (2.4.9.202208010002) UNRELEASED; urgency=medium * Snapshot build - -- Sukchan Lee <acetcom@gmail.com> Sun, 31 Jul 2022 00:09:06 +0000 + -- Sukchan Lee <acetcom@gmail.com> Mon, 01 Aug 2022 00:09:38 +0000 open5gs (2.4.9) unstable; urgency=medium
View file
open5gs_2.4.9.202207310002.tar.xz/debian/control -> open5gs_2.4.9.202208010002.tar.xz/debian/control
Changed
@@ -31,7 +31,7 @@ Package: open5gs-common Architecture: any Multi-Arch: same -Depends: osmocom-nightly (= 1.0.0.202207310002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202208010002), ${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.202207310002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202208010002), ${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.202207310002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202208010002), ${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.202207310002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202208010002), ${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.202207310002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202208010002), ${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.202207310002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202208010002), ${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.202207310002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202208010002), ${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.202207310002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202208010002), ${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.202207310002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202208010002), ${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.202207310002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202208010002), ${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.202207310002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202208010002), ${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.202207310002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202208010002), ${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.202207310002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202208010002), ${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.202207310002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202208010002), ${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.202207310002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202208010002), ${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.202207310002), ${shlibs:Depends}, +Depends: osmocom-nightly (= 1.0.0.202208010002), ${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.202207310002), ${misc:Depends}, +Depends: osmocom-nightly (= 1.0.0.202208010002), ${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.202207310002), ${misc:Depends}, +Depends: osmocom-nightly (= 1.0.0.202208010002), ${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.9.202207310002.tar.xz/lib/diameter/s6a/message.h -> open5gs_2.4.9.202208010002.tar.xz/lib/diameter/s6a/message.h
Changed
@@ -168,8 +168,6 @@ uint32_t *err; uint32_t *exp_err; - bool during_attach; - ogs_diam_s6a_clr_message_t clr_message; ogs_diam_s6a_aia_message_t aia_message; ogs_diam_s6a_ula_message_t ula_message;
View file
open5gs_2.4.9.202207310002.tar.xz/lib/nas/eps/types.h -> open5gs_2.4.9.202208010002.tar.xz/lib/nas/eps/types.h
Changed
@@ -225,7 +225,7 @@ * O TV 2 */ /* REQUEST_ACCEPTED(16) cause is defined by Open5GS */ -#define EMM_CAUSE_REQUEST_ACCEPTED 16 +#define OGS_NAS_EMM_CAUSE_REQUEST_ACCEPTED 16 /* Annex A (informative) Cause values for EPS mobility management * A.1 Causes related to UE identification */
View file
open5gs_2.4.9.202207310002.tar.xz/src/mme/mme-fd-path.c -> open5gs_2.4.9.202208010002.tar.xz/src/mme/mme-fd-path.c
Changed
@@ -229,7 +229,6 @@ s6a_message = ogs_calloc(1, sizeof(ogs_diam_s6a_message_t)); ogs_assert(s6a_message); s6a_message->cmd_code = OGS_DIAM_S6A_CMD_CODE_AUTHENTICATION_INFORMATION; - s6a_message->during_attach = true; aia_message = &s6a_message->aia_message; ogs_assert(aia_message); e_utran_vector = &aia_message->e_utran_vector; @@ -638,7 +637,6 @@ s6a_message = ogs_calloc(1, sizeof(ogs_diam_s6a_message_t)); ogs_assert(s6a_message); s6a_message->cmd_code = OGS_DIAM_S6A_CMD_CODE_UPDATE_LOCATION; - s6a_message->during_attach = true; ula_message = &s6a_message->ula_message; ogs_assert(ula_message); subscription_data = &ula_message->subscription_data; @@ -1439,7 +1437,6 @@ s6a_message->cmd_code = OGS_DIAM_S6A_CMD_CODE_CANCEL_LOCATION; clr_message = &s6a_message->clr_message; ogs_assert(clr_message); - /* Create answer header */ qry = *msg;
View file
open5gs_2.4.9.202207310002.tar.xz/src/mme/mme-s6a-handler.c -> open5gs_2.4.9.202208010002.tar.xz/src/mme/mme-s6a-handler.c
Changed
@@ -23,16 +23,33 @@ #include "mme-sm.h" #include "mme-s6a-handler.h" -void mme_s6a_handle_aia(mme_ue_t *mme_ue, - ogs_diam_s6a_aia_message_t *aia_message) +/* Unfortunately fd doesn't distinguish + * between result-code and experimental-result-code. + * + * However, e.g. 5004 has different meaning + * if used in result-code than in experimental-result-code */ +static uint8_t emm_cause_from_diameter( + const uint32_t *dia_err, const uint32_t *dia_exp_err); + +uint8_t mme_s6a_handle_aia( + mme_ue_t *mme_ue, ogs_diam_s6a_message_t *s6a_message) { + ogs_diam_s6a_aia_message_t *aia_message = NULL; ogs_diam_e_utran_vector_t *e_utran_vector = NULL; ogs_assert(mme_ue); + ogs_assert(s6a_message); + aia_message = &s6a_message->aia_message; ogs_assert(aia_message); e_utran_vector = &aia_message->e_utran_vector; ogs_assert(e_utran_vector); + if (s6a_message->result_code != ER_DIAMETER_SUCCESS) { + ogs_warn("Authentication Information failed %d", + s6a_message->result_code); + return emm_cause_from_diameter(s6a_message->err, s6a_message->exp_err); + } + mme_ue->xres_len = e_utran_vector->xres_len; memcpy(mme_ue->xres, e_utran_vector->xres, mme_ue->xres_len); memcpy(mme_ue->kasme, e_utran_vector->kasme, OGS_SHA256_DIGEST_SIZE); @@ -44,22 +61,31 @@ if (mme_ue->nas_eps.ksi == OGS_NAS_KSI_NO_KEY_IS_AVAILABLE) mme_ue->nas_eps.ksi = 0; - ogs_assert(OGS_OK == - nas_eps_send_authentication_request(mme_ue)); + ogs_assert(OGS_OK == nas_eps_send_authentication_request(mme_ue)); + + return OGS_NAS_EMM_CAUSE_REQUEST_ACCEPTED; } -void mme_s6a_handle_ula(mme_ue_t *mme_ue, - ogs_diam_s6a_ula_message_t *ula_message) +uint8_t mme_s6a_handle_ula( + mme_ue_t *mme_ue, ogs_diam_s6a_message_t *s6a_message) { + ogs_diam_s6a_ula_message_t *ula_message = NULL; ogs_subscription_data_t *subscription_data = NULL; ogs_slice_data_t *slice_data = NULL; - int i; + int i, rv; ogs_assert(mme_ue); + ogs_assert(s6a_message); + ula_message = &s6a_message->ula_message; ogs_assert(ula_message); subscription_data = &ula_message->subscription_data; ogs_assert(subscription_data); + if (s6a_message->result_code != ER_DIAMETER_SUCCESS) { + ogs_error("Update Location failed %d", s6a_message->result_code); + return emm_cause_from_diameter(s6a_message->err, s6a_message->exp_err); + } + ogs_assert(subscription_data->num_of_slice == 1); slice_data = &subscription_data->slice0; @@ -92,7 +118,8 @@ memcpy(&mme_ue->sessioni.smf_ip, &slice_data->sessioni.smf_ip, sizeof(mme_ue->sessioni.smf_ip)); - memcpy(&mme_ue->sessioni.charging_characteristics, &slice_data->sessioni.charging_characteristics, + memcpy(&mme_ue->sessioni.charging_characteristics, + &slice_data->sessioni.charging_characteristics, sizeof(mme_ue->sessioni.charging_characteristics)); mme_ue->sessioni.charging_characteristics_presence = slice_data->sessioni.charging_characteristics_presence; @@ -100,10 +127,35 @@ mme_ue->num_of_session = i; mme_ue->context_identifier = slice_data->context_identifier; + + if (mme_ue->nas_eps.type == MME_EPS_TYPE_ATTACH_REQUEST) { + rv = nas_eps_send_emm_to_esm(mme_ue, + &mme_ue->pdn_connectivity_request); + if (rv != OGS_OK) { + ogs_error("nas_eps_send_emm_to_esm() failed"); + return OGS_NAS_EMM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED; + } + } else if (mme_ue->nas_eps.type == MME_EPS_TYPE_TAU_REQUEST) { + ogs_assert(OGS_OK == + nas_eps_send_tau_accept(mme_ue, + S1AP_ProcedureCode_id_InitialContextSetup)); + } else if (mme_ue->nas_eps.type == MME_EPS_TYPE_SERVICE_REQUEST) { + ogs_error("%s Service request", mme_ue->imsi_bcd); + return OGS_NAS_EMM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED; + } else if (mme_ue->nas_eps.type == + MME_EPS_TYPE_DETACH_REQUEST_FROM_UE) { + ogs_error("%s Detach request", mme_ue->imsi_bcd); + return OGS_NAS_EMM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED; + } else { + ogs_fatal("Invalid Type%d", mme_ue->nas_eps.type); + ogs_assert_if_reached(); + } + + return OGS_NAS_EMM_CAUSE_REQUEST_ACCEPTED; } -void mme_s6a_handle_clr(mme_ue_t *mme_ue, - ogs_diam_s6a_clr_message_t *clr_message) +void mme_s6a_handle_clr( + mme_ue_t *mme_ue, ogs_diam_s6a_clr_message_t *clr_message) { uint8_t detach_type = 0; @@ -131,3 +183,48 @@ ogs_assert(OGS_OK == nas_eps_send_detach_request(mme_ue, detach_type)); } } + +/* 3GPP TS 29.272 Annex A; Table !.a: + * Mapping from S6a error codes to NAS Cause Codes */ +static uint8_t emm_cause_from_diameter( + const uint32_t *dia_err, const uint32_t *dia_exp_err) +{ + if (dia_exp_err) { + switch (*dia_exp_err) { + case OGS_DIAM_S6A_ERROR_USER_UNKNOWN: /* 5001 */ + return OGS_NAS_EMM_CAUSE_PLMN_NOT_ALLOWED; + case OGS_DIAM_S6A_ERROR_UNKNOWN_EPS_SUBSCRIPTION: /* 5420 */ + /* FIXME: Error diagnostic? */ + return OGS_NAS_EMM_CAUSE_NO_SUITABLE_CELLS_IN_TRACKING_AREA; + case OGS_DIAM_S6A_ERROR_RAT_NOT_ALLOWED: /* 5421 */ + return OGS_NAS_EMM_CAUSE_ROAMING_NOT_ALLOWED_IN_THIS_TRACKING_AREA; + case OGS_DIAM_S6A_ERROR_ROAMING_NOT_ALLOWED: /* 5004 */ + return OGS_NAS_EMM_CAUSE_PLMN_NOT_ALLOWED; + /* return OGS_NAS_EMM_CAUSE_EPS_SERVICES_NOT_ALLOWED_IN_THIS_PLMN; + * (ODB_HPLMN_APN) */ + /* return OGS_NAS_EMM_CAUSE_ESM_FAILURE; (ODB_ALL_APN) */ + case OGS_DIAM_S6A_AUTHENTICATION_DATA_UNAVAILABLE: /* 4181 */ + return OGS_NAS_EMM_CAUSE_NETWORK_FAILURE; + } + } + if (dia_err) { + switch (*dia_err) { + case ER_DIAMETER_AUTHORIZATION_REJECTED: /* 5003 */ + case ER_DIAMETER_UNABLE_TO_DELIVER: /* 3002 */ + case ER_DIAMETER_REALM_NOT_SERVED: /* 3003 */ + return OGS_NAS_EMM_CAUSE_NO_SUITABLE_CELLS_IN_TRACKING_AREA; + case ER_DIAMETER_UNABLE_TO_COMPLY: /* 5012 */ + case ER_DIAMETER_INVALID_AVP_VALUE: /* 5004 */ + case ER_DIAMETER_AVP_UNSUPPORTED: /* 5001 */ + case ER_DIAMETER_MISSING_AVP: /* 5005 */ + case ER_DIAMETER_RESOURCES_EXCEEDED: /* 5006 */ + case ER_DIAMETER_AVP_OCCURS_TOO_MANY_TIMES: /* 5009 */ + return OGS_NAS_EMM_CAUSE_NETWORK_FAILURE; + } + } + + ogs_error("Unexpected Diameter Result Code %d/%d, defaulting to severe " + "network failure", + dia_err ? *dia_err : -1, dia_exp_err ? *dia_exp_err : -1); + return OGS_NAS_EMM_CAUSE_SEVERE_NETWORK_FAILURE; +}
View file
open5gs_2.4.9.202207310002.tar.xz/src/mme/mme-s6a-handler.h -> open5gs_2.4.9.202208010002.tar.xz/src/mme/mme-s6a-handler.h
Changed
@@ -26,12 +26,12 @@ extern "C" { #endif -void mme_s6a_handle_aia(mme_ue_t *mme_ue, - ogs_diam_s6a_aia_message_t *aia_message); -void mme_s6a_handle_ula(mme_ue_t *mme_ue, - ogs_diam_s6a_ula_message_t *ula_message); -void mme_s6a_handle_clr(mme_ue_t *mme_ue, - ogs_diam_s6a_clr_message_t *clr_message); +uint8_t mme_s6a_handle_aia( + mme_ue_t *mme_ue, ogs_diam_s6a_message_t *s6a_message); +uint8_t mme_s6a_handle_ula( + mme_ue_t *mme_ue, ogs_diam_s6a_message_t *s6a_message); +void mme_s6a_handle_clr( + mme_ue_t *mme_ue, ogs_diam_s6a_clr_message_t *clr_message); #ifdef __cplusplus }
View file
open5gs_2.4.9.202207310002.tar.xz/src/mme/mme-sm.c -> open5gs_2.4.9.202208010002.tar.xz/src/mme/mme-sm.c
Changed
@@ -34,54 +34,6 @@ #include "mme-s6a-handler.h" #include "mme-path.h" -/* 3GPP TS 29.272 Annex A; Table !.a: - * Mapping from S6a error codes to NAS Cause Codes */ -static uint8_t emm_cause_from_diameter( - mme_ue_t *mme_ue, const uint32_t *dia_err, const uint32_t *dia_exp_err) -{ - ogs_assert(mme_ue); - - if (dia_exp_err) { - switch (*dia_exp_err) { - case OGS_DIAM_S6A_ERROR_USER_UNKNOWN: /* 5001 */ - ogs_info("%s User Unknown in HSS DB", mme_ue->imsi_bcd); - return OGS_NAS_EMM_CAUSE_PLMN_NOT_ALLOWED; - case OGS_DIAM_S6A_ERROR_UNKNOWN_EPS_SUBSCRIPTION: /* 5420 */ - /* FIXME: Error diagnostic? */ - return OGS_NAS_EMM_CAUSE_NO_SUITABLE_CELLS_IN_TRACKING_AREA; - case OGS_DIAM_S6A_ERROR_RAT_NOT_ALLOWED: /* 5421 */ - return OGS_NAS_EMM_CAUSE_ROAMING_NOT_ALLOWED_IN_THIS_TRACKING_AREA; - case OGS_DIAM_S6A_ERROR_ROAMING_NOT_ALLOWED: /* 5004 */ - return OGS_NAS_EMM_CAUSE_PLMN_NOT_ALLOWED; - /* return OGS_NAS_EMM_CAUSE_EPS_SERVICES_NOT_ALLOWED_IN_THIS_PLMN; - * (ODB_HPLMN_APN) */ - /* return OGS_NAS_EMM_CAUSE_ESM_FAILURE; (ODB_ALL_APN) */ - case OGS_DIAM_S6A_AUTHENTICATION_DATA_UNAVAILABLE: /* 4181 */ - return OGS_NAS_EMM_CAUSE_NETWORK_FAILURE; - } - } - if (dia_err) { - switch (*dia_err) { - case ER_DIAMETER_AUTHORIZATION_REJECTED: /* 5003 */ - case ER_DIAMETER_UNABLE_TO_DELIVER: /* 3002 */ - case ER_DIAMETER_REALM_NOT_SERVED: /* 3003 */ - return OGS_NAS_EMM_CAUSE_NO_SUITABLE_CELLS_IN_TRACKING_AREA; - case ER_DIAMETER_UNABLE_TO_COMPLY: /* 5012 */ - case ER_DIAMETER_INVALID_AVP_VALUE: /* 5004 */ - case ER_DIAMETER_AVP_UNSUPPORTED: /* 5001 */ - case ER_DIAMETER_MISSING_AVP: /* 5005 */ - case ER_DIAMETER_RESOURCES_EXCEEDED: /* 5006 */ - case ER_DIAMETER_AVP_OCCURS_TOO_MANY_TIMES: /* 5009 */ - return OGS_NAS_EMM_CAUSE_NETWORK_FAILURE; - } - } - - ogs_error("Unexpected Diameter Result Code %d/%d, defaulting to severe " - "network failure", - dia_err ? *dia_err : -1, dia_exp_err ? *dia_exp_err : -1); - return OGS_NAS_EMM_CAUSE_SEVERE_NETWORK_FAILURE; -} - void mme_state_initial(ogs_fsm_t *s, mme_event_t *e) { mme_sm_debug(e); @@ -122,6 +74,7 @@ mme_sess_t *sess = NULL; ogs_diam_s6a_message_t *s6a_message = NULL; + uint8_t emm_cause = 0; ogs_gtp_node_t *gnode = NULL; ogs_gtp_xact_t *xact = NULL; @@ -437,26 +390,20 @@ s6a_message = e->s6a_message; ogs_assert(s6a_message); - if (s6a_message->during_attach) { - enb_ue = enb_ue_cycle(mme_ue->enb_ue); - if (!enb_ue) { - ogs_error("S1 context has already been removed"); - - ogs_subscription_data_free( - &s6a_message->ula_message.subscription_data); - ogs_free(s6a_message); - break; - } - - if (s6a_message->result_code != ER_DIAMETER_SUCCESS) { - /* Unfortunately fd doesn't distinguish - * between result-code and experimental-result-code. - * - * However, e.g. 5004 has different meaning - * if used in result-code than in experimental-result-code */ - uint8_t emm_cause = emm_cause_from_diameter( - mme_ue, s6a_message->err, s6a_message->exp_err); + enb_ue = enb_ue_cycle(mme_ue->enb_ue); + if (!enb_ue) { + ogs_error("S1 context has already been removed"); + + ogs_subscription_data_free( + &s6a_message->ula_message.subscription_data); + ogs_free(s6a_message); + break; + } + switch (s6a_message->cmd_code) { + case OGS_DIAM_S6A_CMD_CODE_AUTHENTICATION_INFORMATION: + emm_cause = mme_s6a_handle_aia(mme_ue, s6a_message); + if (emm_cause != OGS_NAS_EMM_CAUSE_REQUEST_ACCEPTED) { ogs_info("%s Attach reject OGS_NAS_EMM_CAUSE:%d", mme_ue->imsi_bcd, emm_cause); ogs_assert(OGS_OK == @@ -467,43 +414,21 @@ s1ap_send_ue_context_release_command(enb_ue, S1AP_Cause_PR_nas, S1AP_CauseNas_normal_release, S1AP_UE_CTX_REL_UE_CONTEXT_REMOVE, 0)); - - ogs_subscription_data_free( - &s6a_message->ula_message.subscription_data); - ogs_free(s6a_message); - break; } - } - - switch (s6a_message->cmd_code) { - case OGS_DIAM_S6A_CMD_CODE_AUTHENTICATION_INFORMATION: - mme_s6a_handle_aia(mme_ue, &s6a_message->aia_message); break; case OGS_DIAM_S6A_CMD_CODE_UPDATE_LOCATION: - mme_s6a_handle_ula(mme_ue, &s6a_message->ula_message); - - if (mme_ue->nas_eps.type == MME_EPS_TYPE_ATTACH_REQUEST) { - rv = nas_eps_send_emm_to_esm(mme_ue, - &mme_ue->pdn_connectivity_request); - if (rv != OGS_OK) { - ogs_error("nas_eps_send_emm_to_esm() failed"); - ogs_assert(OGS_OK == - nas_eps_send_attach_reject(mme_ue, - OGS_NAS_EMM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED, + emm_cause = mme_s6a_handle_ula(mme_ue, s6a_message); + if (emm_cause != OGS_NAS_EMM_CAUSE_REQUEST_ACCEPTED) { + ogs_info("%s Attach reject OGS_NAS_EMM_CAUSE:%d", + mme_ue->imsi_bcd, emm_cause); + ogs_assert(OGS_OK == + nas_eps_send_attach_reject(mme_ue, emm_cause, OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED)); - } - } else if (mme_ue->nas_eps.type == MME_EPS_TYPE_TAU_REQUEST) { + ogs_assert(OGS_OK == - nas_eps_send_tau_accept(mme_ue, - S1AP_ProcedureCode_id_InitialContextSetup)); - } else if (mme_ue->nas_eps.type == MME_EPS_TYPE_SERVICE_REQUEST) { - ogs_error("%s Service request", mme_ue->imsi_bcd); - } else if (mme_ue->nas_eps.type == - MME_EPS_TYPE_DETACH_REQUEST_FROM_UE) { - ogs_error("%s Detach request", mme_ue->imsi_bcd); - } else { - ogs_fatal("Invalid Type%d", mme_ue->nas_eps.type); - ogs_assert_if_reached(); + s1ap_send_ue_context_release_command(enb_ue, + S1AP_Cause_PR_nas, S1AP_CauseNas_normal_release, + S1AP_UE_CTX_REL_UE_CONTEXT_REMOVE, 0)); } break; case OGS_DIAM_S6A_CMD_CODE_CANCEL_LOCATION:
View file
open5gs_2.4.9.202207310002.tar.xz/src/mme/nas-path.c -> open5gs_2.4.9.202208010002.tar.xz/src/mme/nas-path.c
Changed
@@ -306,7 +306,7 @@ } rv = s1ap_send_ue_context_release_command(enb_ue, - S1AP_Cause_PR_nas, S1AP_CauseNas_detach, + S1AP_Cause_PR_nas, S1AP_CauseNas_normal_release, S1AP_UE_CTX_REL_S1_REMOVE_AND_UNLINK, 0); ogs_expect(rv == OGS_OK);
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
.