Projects
osmocom:nightly
open5gs
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 103
View file
open5gs_2.4.11.10.a99a7.202210070002.dsc
Added
@@ -0,0 +1,37 @@ +Format: 3.0 (native) +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.11.10.a99a7.202210070002 +Maintainer: Harald Welte <laforge@gnumonks.org> +Uploaders: Sukchan Lee <acetcom@gmail.com> +Homepage: https://open5gs.org +Standards-Version: 4.3.0 +Vcs-Browser: https://github.com/open5gs/open5gs +Vcs-Git: git://github.com/open5gs/open5gs +Build-Depends: debhelper (>= 11), git, pkg-config, meson (>= 0.43.0), flex, bison, libgnutls28-dev, libgcrypt-dev, libssl-dev, libidn11-dev, libmongoc-dev, libbson-dev, libsctp-dev, libyaml-dev, libmicrohttpd-dev, libcurl4-gnutls-dev, libnghttp2-dev, libtins-dev, libtalloc-dev +Package-List: + open5gs deb net optional arch=any + open5gs-amf deb net optional arch=any + open5gs-ausf deb net optional arch=any + open5gs-bsf deb net optional arch=any + open5gs-common deb net optional arch=any + open5gs-dbg deb net optional arch=any + open5gs-hss deb net optional arch=any + open5gs-mme deb net optional arch=any + open5gs-nrf deb net optional arch=any + open5gs-nssf deb net optional arch=any + open5gs-pcf deb net optional arch=any + open5gs-pcrf deb net optional arch=any + open5gs-sgwc deb net optional arch=any + open5gs-sgwu deb net optional arch=any + open5gs-smf deb net optional arch=any + open5gs-udm deb net optional arch=any + open5gs-udr deb net optional arch=any + open5gs-upf deb net optional arch=any +Checksums-Sha1: + 9adbfeb799d22e31426536422c9c6b005c01c02a 11471192 open5gs_2.4.11.10.a99a7.202210070002.tar.xz +Checksums-Sha256: + 65c83ea2122c88e2708419db0ade358fb9449c13b55a8e0bf81f1dc2e59a56d1 11471192 open5gs_2.4.11.10.a99a7.202210070002.tar.xz +Files: + 03fc18cb8b0b8a11c2a7a29135383be3 11471192 open5gs_2.4.11.10.a99a7.202210070002.tar.xz
View file
open5gs_2.4.11.7.be2af.202210060002.tar.xz/.tarball-version -> open5gs_2.4.11.10.a99a7.202210070002.tar.xz/.tarball-version
Changed
@@ -1 +1 @@ -2.4.11.7-be2af.202210060002 +2.4.11.10-a99a7.202210070002
View file
open5gs_2.4.11.7.be2af.202210060002.tar.xz/debian/changelog -> open5gs_2.4.11.10.a99a7.202210070002.tar.xz/debian/changelog
Changed
@@ -1,8 +1,8 @@ -open5gs (2.4.11.7.be2af.202210060002) unstable; urgency=medium +open5gs (2.4.11.10.a99a7.202210070002) unstable; urgency=medium * Automatically generated changelog entry for building the Osmocom nightly feed - -- Osmocom OBS scripts <info@osmocom.org> Thu, 06 Oct 2022 00:07:10 +0000 + -- Osmocom OBS scripts <info@osmocom.org> Fri, 07 Oct 2022 00:05:00 +0000 open5gs (2.4.11) unstable; urgency=medium
View file
open5gs_2.4.11.7.be2af.202210060002.tar.xz/lib/gtp/xact.h -> open5gs_2.4.11.10.a99a7.202210070002.tar.xz/lib/gtp/xact.h
Changed
@@ -104,8 +104,7 @@ #define OGS_GTP_DELETE_SEND_RELEASE_WITH_S1_REMOVE_AND_UNLINK 6 #define OGS_GTP_DELETE_HANDLE_PDN_CONNECTIVITY_REQUEST 7 #define OGS_GTP_DELETE_UE_CONTEXT_REMOVE_PARTIAL 8 -#define OGS_GTP_DELETE_UE_CONTEXT_REMOVE_ALL 9 -#define OGS_GTP_DELETE_IN_PATH_SWITCH_REQUEST 10 +#define OGS_GTP_DELETE_IN_PATH_SWITCH_REQUEST 9 int delete_action;
View file
open5gs_2.4.11.7.be2af.202210060002.tar.xz/lib/pfcp/types.h -> open5gs_2.4.11.10.a99a7.202210070002.tar.xz/lib/pfcp/types.h
Changed
@@ -1191,8 +1191,8 @@ union { struct { ED3(uint8_t spare:6;, - uint8_t dlpa:1;, - uint8_t dlby:1;) + uint8_t dlby:1;, + uint8_t dlpa:1;) }; uint8_t flags; };
View file
open5gs_2.4.11.7.be2af.202210060002.tar.xz/lib/sbi/message.c -> open5gs_2.4.11.10.a99a7.202210070002.tar.xz/lib/sbi/message.c
Changed
@@ -179,6 +179,10 @@ OpenAPI_termination_notification_free(message->TerminationNotification); if (message->DeregistrationData) OpenAPI_deregistration_data_free(message->DeregistrationData); + if (message->SDMSubscription) + OpenAPI_sdm_subscription_free(message->SDMSubscription); + if (message->ModificationNotification) + OpenAPI_modification_notification_free(message->ModificationNotification); /* HTTP Part */ for (i = 0; i < message->num_of_part; i++) { @@ -1022,6 +1026,15 @@ item = OpenAPI_deregistration_data_convertToJSON( message->DeregistrationData); ogs_assert(item); + } else if (message->SDMSubscription) { + item = OpenAPI_sdm_subscription_convertToJSON( + message->SDMSubscription); + ogs_assert(item); + } + else if (message->ModificationNotification) { + item = OpenAPI_modification_notification_convertToJSON( + message->ModificationNotification); + ogs_assert(item); } if (item) { @@ -1326,6 +1339,15 @@ } break; + CASE(OGS_SBI_RESOURCE_NAME_SDM_SUBSCRIPTIONS) + message->SDMSubscription = + OpenAPI_sdm_subscription_parseFromJSON(item); + if (!message->SDMSubscription) { + rv = OGS_ERROR; + ogs_error("JSON parse error"); + } + break; + DEFAULT rv = OGS_ERROR; ogs_error("Unknown resource name %s", @@ -1867,6 +1889,15 @@ rv = OGS_ERROR; ogs_error("JSON parse error"); } + break; + + CASE(OGS_SBI_RESOURCE_NAME_SDMSUBSCRIPTION_NOTIFY) + message->ModificationNotification = + OpenAPI_modification_notification_parseFromJSON(item); + if (!message->ModificationNotification) { + rv = OGS_ERROR; + ogs_error("JSON parse error"); + } break; DEFAULT
View file
open5gs_2.4.11.7.be2af.202210060002.tar.xz/lib/sbi/message.h -> open5gs_2.4.11.10.a99a7.202210070002.tar.xz/lib/sbi/message.h
Changed
@@ -95,6 +95,7 @@ #define OGS_SBI_RESOURCE_NAME_UE_CONTEXT_IN_SMF_DATA "ue-context-in-smf-data" #define OGS_SBI_RESOURCE_NAME_SMF_SELECTION_SUBSCRIPTION_DATA \ "smf-selection-subscription-data" +#define OGS_SBI_RESOURCE_NAME_SDM_SUBSCRIPTIONS "sdm-subscriptions" #define OGS_SBI_RESOURCE_NAME_SECURITY_INFORMATION "security-information" #define OGS_SBI_RESOURCE_NAME_GENERATE_AUTH_DATA "generate-auth-data" @@ -126,6 +127,8 @@ #define OGS_SBI_RESOURCE_NAME_SM_CONTEXT_STATUS "sm-context-status" #define OGS_SBI_RESOURCE_NAME_AM_POLICY_NOTIFY "am-policy-notify" #define OGS_SBI_RESOURCE_NAME_DEREG_NOTIFY "dereg-notify" +#define OGS_SBI_RESOURCE_NAME_SDMSUBSCRIPTION_NOTIFY \ + "sdmsubscription-notify" #define OGS_SBI_RESOURCE_NAME_POLICIES "policies" #define OGS_SBI_RESOURCE_NAME_SM_POLICIES "sm-policies" @@ -452,6 +455,8 @@ OpenAPI_sm_policy_notification_t *SmPolicyNotification; OpenAPI_termination_notification_t *TerminationNotification; OpenAPI_deregistration_data_t *DeregistrationData; + OpenAPI_sdm_subscription_t *SDMSubscription; + OpenAPI_modification_notification_t *ModificationNotification; ogs_sbi_links_t *links;
View file
open5gs_2.4.11.7.be2af.202210060002.tar.xz/lib/sbi/ogs-sbi.h -> open5gs_2.4.11.10.a99a7.202210070002.tar.xz/lib/sbi/ogs-sbi.h
Changed
@@ -75,6 +75,8 @@ #include "model/sm_policy_notification.h" #include "model/termination_notification.h" #include "model/deregistration_data.h" +#include "model/sdm_subscription.h" +#include "model/modification_notification.h" #include "custom/links.h" #include "custom/ue_authentication_ctx.h"
View file
open5gs_2.4.11.7.be2af.202210060002.tar.xz/src/amf/amf-sm.c -> open5gs_2.4.11.10.a99a7.202210070002.tar.xz/src/amf/amf-sm.c
Changed
@@ -213,6 +213,11 @@ amf_namf_callback_handle_dereg_notify(stream, &sbi_message); break; + CASE(OGS_SBI_RESOURCE_NAME_SDMSUBSCRIPTION_NOTIFY) + amf_namf_callback_handle_sdm_data_change_notify( + stream, &sbi_message); + break; + CASE(OGS_SBI_RESOURCE_NAME_AM_POLICY_NOTIFY) ogs_assert(true == ogs_sbi_send_http_status_no_content(stream)); break;
View file
open5gs_2.4.11.7.be2af.202210060002.tar.xz/src/amf/context.c -> open5gs_2.4.11.10.a99a7.202210070002.tar.xz/src/amf/context.c
Changed
@@ -1387,6 +1387,8 @@ if (amf_ue->policy_association_id) ogs_free(amf_ue->policy_association_id); + if (amf_ue->data_change_subscription_id) + ogs_free(amf_ue->data_change_subscription_id); if (amf_ue->confirmation_url_for_5g_aka) ogs_free(amf_ue->confirmation_url_for_5g_aka);
View file
open5gs_2.4.11.7.be2af.202210060002.tar.xz/src/amf/context.h -> open5gs_2.4.11.10.a99a7.202210070002.tar.xz/src/amf/context.h
Changed
@@ -393,6 +393,9 @@ /* Network Initiated De-Registration */ bool network_initiated_de_reg; + /* SubscriptionId of Subscription to Data Change Notification to UDM */ + char *data_change_subscription_id; + ogs_list_t sess_list; };
View file
open5gs_2.4.11.7.be2af.202210060002.tar.xz/src/amf/gmm-sm.c -> open5gs_2.4.11.10.a99a7.202210070002.tar.xz/src/amf/gmm-sm.c
Changed
@@ -988,6 +988,7 @@ SWITCH(sbi_message->h.resource.component1) CASE(OGS_SBI_RESOURCE_NAME_REGISTRATIONS) if (sbi_message->res_status != OGS_SBI_HTTP_STATUS_CREATED && + sbi_message->res_status != OGS_SBI_HTTP_STATUS_NO_CONTENT && sbi_message->res_status != OGS_SBI_HTTP_STATUS_OK) { ogs_error("%s HTTP response error %d", amf_ue->supi, sbi_message->res_status); @@ -1027,7 +1028,9 @@ CASE(OGS_SBI_RESOURCE_NAME_AM_DATA) CASE(OGS_SBI_RESOURCE_NAME_SMF_SELECT_DATA) CASE(OGS_SBI_RESOURCE_NAME_UE_CONTEXT_IN_SMF_DATA) - if (sbi_message->res_status != OGS_SBI_HTTP_STATUS_OK) { + CASE(OGS_SBI_RESOURCE_NAME_SDM_SUBSCRIPTIONS) + if ((sbi_message->res_status != OGS_SBI_HTTP_STATUS_OK) && + (sbi_message->res_status != OGS_SBI_HTTP_STATUS_CREATED)) { ogs_error("%s HTTP response error %d", amf_ue->supi, sbi_message->res_status); ogs_assert(OGS_OK ==
View file
open5gs_2.4.11.7.be2af.202210060002.tar.xz/src/amf/namf-handler.c -> open5gs_2.4.11.10.a99a7.202210070002.tar.xz/src/amf/namf-handler.c
Changed
@@ -606,3 +606,114 @@ return OGS_OK; } + +int amf_namf_callback_handle_sdm_data_change_notify( + ogs_sbi_stream_t *stream, ogs_sbi_message_t *recvmsg) +{ + int status = OGS_SBI_HTTP_STATUS_NO_CONTENT; + + amf_ue_t *amf_ue = NULL; + + ogs_sbi_message_t sendmsg; + ogs_sbi_response_t *response = NULL; + + OpenAPI_modification_notification_t *ModificationNotification; + OpenAPI_lnode_t *node; + + char *ueid = NULL; + char *res_name = NULL; + + ogs_assert(stream); + ogs_assert(recvmsg); + + ModificationNotification = recvmsg->ModificationNotification; + if (!ModificationNotification) { + status = OGS_SBI_HTTP_STATUS_BAD_REQUEST; + ogs_error("%s No ModificationNotification", amf_ue->supi); + goto cleanup; + } + + + OpenAPI_list_for_each(ModificationNotification->notify_items, node) + { + OpenAPI_notify_item_t *item = node->data; + + char *saveptr = NULL; + + ueid = ogs_sbi_parse_uri(item->resource_id, "/", &saveptr); + if (!ueid) { + status = OGS_SBI_HTTP_STATUS_BAD_REQUEST; + ogs_error("%s No UeId", item->resource_id); + goto cleanup; + } + + amf_ue = amf_ue_find_by_supi(ueid); + if (!amf_ue) { + status = OGS_SBI_HTTP_STATUS_NOT_FOUND; + ogs_error("Cannot find SUPI %s", ueid); + goto cleanup; + } + + res_name = ogs_sbi_parse_uri(NULL, "/", &saveptr); + if (!res_name) { + status = OGS_SBI_HTTP_STATUS_BAD_REQUEST; + ogs_error("%s No Resource Name", item->resource_id); + goto cleanup; + } + + SWITCH(res_name) + CASE(OGS_SBI_RESOURCE_NAME_AM_DATA) + OpenAPI_lnode_t *node_ci; + + OpenAPI_list_for_each(item->changes, node_ci) + { + /* + OpenAPI_change_item_t *item_change = node_ci->data; + item_change->path; + item_change->from; + item_change->new_value; + item_change->orig_value; + */ + /* + switch (item_change->op) { + case OpenAPI_change_type_ADD: + break; + case OpenAPI_change_type_MOVE: + break; + case OpenAPI_change_type__REMOVE: + break; + case OpenAPI_change_type_REPLACE: + break; + default: + break; + } + */ + } + break; + DEFAULT + status = OGS_SBI_HTTP_STATUS_BAD_REQUEST; + ogs_error("Unknown Resource Name: %s", res_name); + goto cleanup; + END + + ogs_free(ueid); + ogs_free(res_name); + + ueid = NULL; + res_name = NULL; + } + +cleanup: + if (ueid) + ogs_free(ueid); + if (res_name) + ogs_free(res_name); + + memset(&sendmsg, 0, sizeof(sendmsg)); + + response = ogs_sbi_build_response(&sendmsg, status); + ogs_assert(response); + ogs_assert(true == ogs_sbi_server_send_response(stream, response)); + + return OGS_OK; +}
View file
open5gs_2.4.11.7.be2af.202210060002.tar.xz/src/amf/namf-handler.h -> open5gs_2.4.11.10.a99a7.202210070002.tar.xz/src/amf/namf-handler.h
Changed
@@ -32,6 +32,8 @@ ogs_sbi_stream_t *stream, ogs_sbi_message_t *recvmsg); int amf_namf_callback_handle_dereg_notify( ogs_sbi_stream_t *stream, ogs_sbi_message_t *recvmsg); +int amf_namf_callback_handle_sdm_data_change_notify( + ogs_sbi_stream_t *stream, ogs_sbi_message_t *recvmsg); #ifdef __cplusplus }
View file
open5gs_2.4.11.7.be2af.202210060002.tar.xz/src/amf/nudm-build.c -> open5gs_2.4.11.10.a99a7.202210070002.tar.xz/src/amf/nudm-build.c
Changed
@@ -137,3 +137,63 @@ return request; } + +ogs_sbi_request_t *amf_nudm_sdm_build_subscription(amf_ue_t *amf_ue, void *data) +{ + ogs_sbi_message_t message; + ogs_sbi_header_t header; + ogs_sbi_request_t *request = NULL; + ogs_sbi_server_t *server = NULL; + + OpenAPI_sdm_subscription_t SDMSubscription; + + char *monres = NULL; + + ogs_assert(amf_ue); + ogs_assert(amf_ue->supi); + ogs_assert(data); + + memset(&message, 0, sizeof(message)); + message.h.method = (char *)OGS_SBI_HTTP_METHOD_POST; + message.h.service.name = (char *)OGS_SBI_SERVICE_NAME_NUDM_SDM; + message.h.api.version = (char *)OGS_SBI_API_V2; + message.h.resource.component0 = amf_ue->supi; + message.h.resource.component1 = + (char *)OGS_SBI_RESOURCE_NAME_SDM_SUBSCRIPTIONS; + + memset(&SDMSubscription, 0, sizeof(SDMSubscription)); + + SDMSubscription.nf_instance_id = ogs_sbi_self()->nf_instance->id; + + server = ogs_list_first(&ogs_sbi_self()->server_list); + ogs_assert(server); + + memset(&header, 0, sizeof(header)); + header.service.name = (char *)OGS_SBI_SERVICE_NAME_NAMF_CALLBACK; + header.api.version = (char *)OGS_SBI_API_V1; + header.resource.component0 = amf_ue->supi; + header.resource.component1 = + (char *)OGS_SBI_RESOURCE_NAME_SDMSUBSCRIPTION_NOTIFY; + SDMSubscription.callback_reference = + ogs_sbi_server_uri(server, &header); + ogs_assert(SDMSubscription.callback_reference); + + SDMSubscription.monitored_resource_uris = OpenAPI_list_create(); + + monres = ogs_msprintf("%s/%s", amf_ue->supi, (char *)data); + ogs_assert(monres); + + OpenAPI_list_add(SDMSubscription.monitored_resource_uris, monres); + SDMSubscription.implicit_unsubscribe = 1; + + message.SDMSubscription = &SDMSubscription; + + request = ogs_sbi_build_request(&message); + ogs_assert(request); + + ogs_free(monres); + OpenAPI_list_free(SDMSubscription.monitored_resource_uris); + ogs_free(SDMSubscription.callback_reference); + + return request; +}
View file
open5gs_2.4.11.7.be2af.202210060002.tar.xz/src/amf/nudm-build.h -> open5gs_2.4.11.10.a99a7.202210070002.tar.xz/src/amf/nudm-build.h
Changed
@@ -31,6 +31,8 @@ ogs_sbi_request_t *amf_nudm_uecm_build_registration_delete( amf_ue_t *amf_ue, void *data); ogs_sbi_request_t *amf_nudm_sdm_build_get(amf_ue_t *amf_ue, void *data); +ogs_sbi_request_t *amf_nudm_sdm_build_subscription( + amf_ue_t *amf_ue, void *data); #ifdef __cplusplus }
View file
open5gs_2.4.11.7.be2af.202210060002.tar.xz/src/amf/nudm-handler.c -> open5gs_2.4.11.10.a99a7.202210070002.tar.xz/src/amf/nudm-handler.c
Changed
@@ -220,6 +220,69 @@ break; CASE(OGS_SBI_RESOURCE_NAME_UE_CONTEXT_IN_SMF_DATA) + + if (amf_ue->data_change_subscription_id) { + /* we already have a SDM subscription to UDM; continue without + * subscribing again */ + ogs_assert(true == + amf_ue_sbi_discover_and_send( + OGS_SBI_SERVICE_TYPE_NPCF_AM_POLICY_CONTROL, NULL, + amf_npcf_am_policy_control_build_create, amf_ue, NULL)); + } + else { + ogs_assert(true == + amf_ue_sbi_discover_and_send( + OGS_SBI_SERVICE_TYPE_NUDM_SDM, NULL, + amf_nudm_sdm_build_subscription, amf_ue, + (char *)OGS_SBI_RESOURCE_NAME_AM_DATA)); + } + break; + + CASE(OGS_SBI_RESOURCE_NAME_SDM_SUBSCRIPTIONS) + + int rv; + ogs_sbi_message_t message; + ogs_sbi_header_t header; + + if (!recvmsg->http.location) { + ogs_error("%s No http.location", amf_ue->supi); + ogs_assert(OGS_OK == + nas_5gs_send_gmm_reject_from_sbi( + amf_ue, OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR)); + return OGS_ERROR; + } + + memset(&header, 0, sizeof(header)); + header.uri = recvmsg->http.location; + + rv = ogs_sbi_parse_header(&message, &header); + if (rv != OGS_OK) { + ogs_error("%s Cannot parse http.location %s", + amf_ue->supi, recvmsg->http.location); + ogs_assert(OGS_OK == + nas_5gs_send_gmm_reject_from_sbi( + amf_ue, OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR)); + return OGS_ERROR; + } + + if (!message.h.resource.component2) { + ogs_error("%s No Subscription ID %s", + amf_ue->supi, recvmsg->http.location); + + ogs_sbi_header_free(&header); + ogs_assert(OGS_OK == + nas_5gs_send_gmm_reject_from_sbi( + amf_ue, OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR)); + return OGS_ERROR; + } + + if (amf_ue->data_change_subscription_id) + ogs_free(amf_ue->data_change_subscription_id); + amf_ue->data_change_subscription_id = + ogs_strdup(message.h.resource.component2); + + ogs_sbi_header_free(&header); + ogs_assert(true == amf_ue_sbi_discover_and_send( OGS_SBI_SERVICE_TYPE_NPCF_AM_POLICY_CONTROL, NULL,
View file
open5gs_2.4.11.7.be2af.202210060002.tar.xz/src/mme/mme-path.c -> open5gs_2.4.11.10.a99a7.202210070002.tar.xz/src/mme/mme-path.c
Changed
@@ -81,13 +81,8 @@ case MME_DETACH_TYPE_HSS_IMPLICIT: ogs_debug("Implicit HSS Detach"); if (SESSION_CONTEXT_IS_AVAILABLE(mme_ue)) { - if (ECM_IDLE(mme_ue)) { - mme_gtp_send_delete_all_sessions(mme_ue, - OGS_GTP_DELETE_UE_CONTEXT_REMOVE_ALL); - } else { - mme_gtp_send_delete_all_sessions(mme_ue, - OGS_GTP_DELETE_SEND_RELEASE_WITH_UE_CONTEXT_REMOVE); - } + mme_gtp_send_delete_all_sessions(mme_ue, + OGS_GTP_DELETE_SEND_RELEASE_WITH_UE_CONTEXT_REMOVE); } break; @@ -245,11 +240,6 @@ ogs_warn("MME-initiated Detach cannot be invoked"); } else { ogs_assert(OGS_OK == nas_eps_send_detach_request(mme_ue)); - if (MME_P_TMSI_IS_AVAILABLE(mme_ue)) { - ogs_assert(OGS_OK == sgsap_send_detach_indication(mme_ue)); - } else { - mme_send_delete_session_or_detach(mme_ue); - } } break; default:
View file
open5gs_2.4.11.7.be2af.202210060002.tar.xz/src/mme/mme-s11-handler.c -> open5gs_2.4.11.10.a99a7.202210070002.tar.xz/src/mme/mme-s11-handler.c
Changed
@@ -594,16 +594,16 @@ } else if (action == OGS_GTP_DELETE_SEND_RELEASE_WITH_UE_CONTEXT_REMOVE) { if (mme_sess_count(mme_ue) == 1) /* Last Session */ { - enb_ue_t *enb_ue = NULL; - - enb_ue = enb_ue_cycle(mme_ue->enb_ue); - if (enb_ue) { + if (ECM_IDLE(mme_ue)) { + mme_ue_hash_remove(mme_ue); + mme_ue_remove(mme_ue); + } else { + ogs_assert(mme_ue->enb_ue); ogs_assert(OGS_OK == - s1ap_send_ue_context_release_command(enb_ue, + s1ap_send_ue_context_release_command(mme_ue->enb_ue, S1AP_Cause_PR_nas, S1AP_CauseNas_normal_release, S1AP_UE_CTX_REL_UE_CONTEXT_REMOVE, 0)); - } else - ogs_error("ENB-S1 Context has already been removed"); + } } } else if (action == @@ -640,12 +640,6 @@ mme_ue_remove(mme_ue); return; - } else if (action == OGS_GTP_DELETE_UE_CONTEXT_REMOVE_ALL) { - /* Remove MME-UE Context and hash after Implicit Detach */ - mme_ue_hash_remove(mme_ue); - mme_ue_remove(mme_ue); - return; - } else if (action == OGS_GTP_DELETE_IN_PATH_SWITCH_REQUEST) { /* Don't have to remove Session in X2 Handover with SGW relocation */
View file
open5gs_2.4.11.7.be2af.202210060002.tar.xz/src/mme/mme-s6a-handler.c -> open5gs_2.4.11.10.a99a7.202210070002.tar.xz/src/mme/mme-s6a-handler.c
Changed
@@ -178,6 +178,27 @@ clr_message = &s6a_message->clr_message; ogs_assert(clr_message); + mme_ue = mme_ue_cycle(mme_ue); + if (!mme_ue) { + ogs_warn("UE(mme-ue) context has already been removed"); + return; + } + + /* + * This causes issues in this scenario: + * 1. UE attaches + * 2. UE detaches (Airplane Mode) + * 3. Cancel Location is triggered by HSS + * + * If Cancel Locations are performed, UE(mme-ue) context must be removed. + */ + if (OGS_FSM_CHECK(&mme_ue->sm, emm_state_de_registered)) { + ogs_warn("UE has already been de-registered"); + mme_ue_hash_remove(mme_ue); + mme_ue_remove(mme_ue); + return; + } + /* Set EPS Detach */ memset(&mme_ue->nas_eps.detach, 0, sizeof(ogs_nas_detach_type_t)); @@ -202,31 +223,30 @@ ogs_debug(" OGS_NAS_EPS TYPE%d", mme_ue->nas_eps.type); - if (clr_message->cancellation_type == - OGS_DIAM_S6A_CT_MME_UPDATE_PROCEDURE) { - mme_ue->detach_type = MME_DETACH_TYPE_HSS_IMPLICIT; - if (MME_P_TMSI_IS_AVAILABLE(mme_ue)) { - ogs_assert(OGS_OK == sgsap_send_detach_indication(mme_ue)); - } else { - mme_send_delete_session_or_detach(mme_ue); - } - } else if (clr_message->cancellation_type == - OGS_DIAM_S6A_CT_SUBSCRIPTION_WITHDRAWL) { + switch (clr_message->cancellation_type) { + case OGS_DIAM_S6A_CT_SUBSCRIPTION_WITHDRAWL: mme_ue->detach_type = MME_DETACH_TYPE_HSS_EXPLICIT; if (ECM_IDLE(mme_ue)) { MME_STORE_PAGING_INFO(mme_ue, MME_PAGING_TYPE_DETACH_TO_UE, NULL); ogs_assert(OGS_OK == s1ap_send_paging(mme_ue, S1AP_CNDomain_ps)); } else { ogs_assert(OGS_OK == nas_eps_send_detach_request(mme_ue)); - if (MME_P_TMSI_IS_AVAILABLE(mme_ue)) { - ogs_assert(OGS_OK == sgsap_send_detach_indication(mme_ue)); - } else { - mme_send_delete_session_or_detach(mme_ue); - } } - } else { - ogs_error("Unsupported Cancellation-Type %d", + break; + case OGS_DIAM_S6A_CT_MME_UPDATE_PROCEDURE: + mme_ue->detach_type = MME_DETACH_TYPE_HSS_IMPLICIT; + break; + default: + ogs_fatal("Unsupported Cancellation-Type %d", clr_message->cancellation_type); + ogs_assert_if_reached(); + break; + } + + if (MME_P_TMSI_IS_AVAILABLE(mme_ue)) { + ogs_assert(OGS_OK == sgsap_send_detach_indication(mme_ue)); + } else { + mme_send_delete_session_or_detach(mme_ue); } }
View file
open5gs_2.4.11.7.be2af.202210060002.tar.xz/src/udm/context.c -> open5gs_2.4.11.10.a99a7.202210070002.tar.xz/src/udm/context.c
Changed
@@ -188,6 +188,8 @@ ogs_free(udm_ue->amf_instance_id); if (udm_ue->dereg_callback_uri) ogs_free(udm_ue->dereg_callback_uri); + if (udm_ue->data_change_callback_uri) + ogs_free(udm_ue->data_change_callback_uri); ogs_pool_free(&udm_ue_pool, udm_ue); }
View file
open5gs_2.4.11.7.be2af.202210060002.tar.xz/src/udm/context.h -> open5gs_2.4.11.10.a99a7.202210070002.tar.xz/src/udm/context.h
Changed
@@ -58,6 +58,7 @@ char *amf_instance_id; char *dereg_callback_uri; + char *data_change_callback_uri; uint8_t kOGS_KEY_LEN; uint8_t opcOGS_KEY_LEN;
View file
open5gs_2.4.11.7.be2af.202210060002.tar.xz/src/udm/nudm-handler.c -> open5gs_2.4.11.10.a99a7.202210070002.tar.xz/src/udm/nudm-handler.c
Changed
@@ -479,3 +479,85 @@ return true; } + +bool udm_nudm_sdm_handle_subscription_create( + udm_ue_t *udm_ue, ogs_sbi_stream_t *stream, ogs_sbi_message_t *recvmsg) +{ + ogs_sbi_message_t sendmsg; + ogs_sbi_response_t *response = NULL; + ogs_sbi_server_t *server = NULL; + ogs_sbi_header_t header; + + OpenAPI_sdm_subscription_t *SDMSubscription = NULL; + + ogs_assert(udm_ue); + ogs_assert(stream); + ogs_assert(recvmsg); + + SDMSubscription = recvmsg->SDMSubscription; + if (!SDMSubscription) { + ogs_error("%s No SDMSubscription", udm_ue->supi); + ogs_assert(true == + ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST, + recvmsg, "No SDMSubscription", udm_ue->supi)); + return false; + } + + if (!SDMSubscription->nf_instance_id) { + ogs_error("%s No nfInstanceId", udm_ue->supi); + ogs_assert(true == + ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST, + recvmsg, "No nfInstanceId", udm_ue->supi)); + return false; + } + + if (!SDMSubscription->callback_reference) { + ogs_error("%s No callbackReference", udm_ue->supi); + ogs_assert(true == + ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST, + recvmsg, "No callbackReference", udm_ue->supi)); + return false; + } + + if ((!SDMSubscription->monitored_resource_uris) && + (!SDMSubscription->monitored_resource_uris->count)) { + ogs_error("%s No monitoredResourceUris", udm_ue->supi); + ogs_assert(true == + ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST, + recvmsg, "No monitoredResourceUris", udm_ue->supi)); + return false; + } + + if (udm_ue->data_change_callback_uri) + ogs_free(udm_ue->data_change_callback_uri); + udm_ue->data_change_callback_uri = + ogs_strdup(SDMSubscription->callback_reference); + + + server = ogs_sbi_server_from_stream(stream); + ogs_assert(server); + + memset(&header, 0, sizeof(header)); + header.service.name = (char *)OGS_SBI_SERVICE_NAME_NUDM_SDM; + header.api.version = (char *)OGS_SBI_API_V2; + header.resource.component0 = udm_ue->supi; + header.resource.component1 = + (char *)OGS_SBI_RESOURCE_NAME_SDM_SUBSCRIPTIONS; + /* TODO: subscription id */ + header.resource.component2 = udm_ue->ctx_id; + + memset(&sendmsg, 0, sizeof(sendmsg)); + sendmsg.http.location = ogs_sbi_server_uri(server, &header); + + sendmsg.SDMSubscription = OpenAPI_sdm_subscription_copy( + sendmsg.SDMSubscription, SDMSubscription); + + response = ogs_sbi_build_response(&sendmsg, OGS_SBI_HTTP_STATUS_CREATED); + ogs_assert(response); + ogs_sbi_server_send_response(stream, response); + + ogs_free(sendmsg.http.location); + OpenAPI_sdm_subscription_free(sendmsg.SDMSubscription); + + return true; +}
View file
open5gs_2.4.11.7.be2af.202210060002.tar.xz/src/udm/nudm-handler.h -> open5gs_2.4.11.10.a99a7.202210070002.tar.xz/src/udm/nudm-handler.h
Changed
@@ -38,6 +38,8 @@ bool udm_nudm_sdm_handle_subscription_provisioned( udm_ue_t *udm_ue, ogs_sbi_stream_t *stream, ogs_sbi_message_t *recvmsg); +bool udm_nudm_sdm_handle_subscription_create( + udm_ue_t *udm_ue, ogs_sbi_stream_t *stream, ogs_sbi_message_t *recvmsg); #ifdef __cplusplus }
View file
open5gs_2.4.11.7.be2af.202210060002.tar.xz/src/udm/ue-sm.c -> open5gs_2.4.11.10.a99a7.202210070002.tar.xz/src/udm/ue-sm.c
Changed
@@ -163,6 +163,23 @@ "Invalid resource name", message->h.method)); END break; + + CASE(OGS_SBI_HTTP_METHOD_POST) + SWITCH(message->h.resource.component1) + CASE(OGS_SBI_RESOURCE_NAME_SDM_SUBSCRIPTIONS) + udm_nudm_sdm_handle_subscription_create( + udm_ue, stream, message); + break; + + DEFAULT + ogs_error("%s Invalid resource name %s", + udm_ue->suci, message->h.resource.component1); + ogs_assert(true == + ogs_sbi_server_send_error(stream, + OGS_SBI_HTTP_STATUS_BAD_REQUEST, message, + "Invalid resource name", message->h.method)); + END + break; DEFAULT ogs_error("%s Invalid HTTP method %s", udm_ue->supi, message->h.method);
View file
open5gs_2.4.11.7.be2af.202210060002.dsc
Deleted
@@ -1,37 +0,0 @@ -Format: 3.0 (native) -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.11.7.be2af.202210060002 -Maintainer: Harald Welte <laforge@gnumonks.org> -Uploaders: Sukchan Lee <acetcom@gmail.com> -Homepage: https://open5gs.org -Standards-Version: 4.3.0 -Vcs-Browser: https://github.com/open5gs/open5gs -Vcs-Git: git://github.com/open5gs/open5gs -Build-Depends: debhelper (>= 11), git, pkg-config, meson (>= 0.43.0), flex, bison, libgnutls28-dev, libgcrypt-dev, libssl-dev, libidn11-dev, libmongoc-dev, libbson-dev, libsctp-dev, libyaml-dev, libmicrohttpd-dev, libcurl4-gnutls-dev, libnghttp2-dev, libtins-dev, libtalloc-dev -Package-List: - open5gs deb net optional arch=any - open5gs-amf deb net optional arch=any - open5gs-ausf deb net optional arch=any - open5gs-bsf deb net optional arch=any - open5gs-common deb net optional arch=any - open5gs-dbg deb net optional arch=any - open5gs-hss deb net optional arch=any - open5gs-mme deb net optional arch=any - open5gs-nrf deb net optional arch=any - open5gs-nssf deb net optional arch=any - open5gs-pcf deb net optional arch=any - open5gs-pcrf deb net optional arch=any - open5gs-sgwc deb net optional arch=any - open5gs-sgwu deb net optional arch=any - open5gs-smf deb net optional arch=any - open5gs-udm deb net optional arch=any - open5gs-udr deb net optional arch=any - open5gs-upf deb net optional arch=any -Checksums-Sha1: - 0a01b6b181418252d08b7af95a51f572e91477a3 11470256 open5gs_2.4.11.7.be2af.202210060002.tar.xz -Checksums-Sha256: - 30c8c08db23a2ed0982804d5ff5451e996ce430b4d9aeff62f1ff05429614d71 11470256 open5gs_2.4.11.7.be2af.202210060002.tar.xz -Files: - ffef8331987e9e26a08179ec37492b5d 11470256 open5gs_2.4.11.7.be2af.202210060002.tar.xz
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
.