2019-06-23 11:43:23 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
|
|
|
|
*
|
|
|
|
* This file is part of Open5GS.
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Affero General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
*/
|
2017-03-26 06:34:34 +00:00
|
|
|
|
2019-06-11 13:10:47 +00:00
|
|
|
#include "mme-event.h"
|
2019-07-20 14:06:54 +00:00
|
|
|
#include "mme-timer.h"
|
2019-06-11 13:10:47 +00:00
|
|
|
#include "mme-sm.h"
|
|
|
|
#include "mme-fd-path.h"
|
|
|
|
#include "emm-handler.h"
|
|
|
|
#include "esm-build.h"
|
|
|
|
#include "esm-handler.h"
|
|
|
|
#include "mme-s11-handler.h"
|
|
|
|
#include "nas-path.h"
|
|
|
|
#include "mme-gtp-path.h"
|
2017-03-06 00:00:37 +00:00
|
|
|
|
2019-04-27 14:54:30 +00:00
|
|
|
#undef OGS_LOG_DOMAIN
|
|
|
|
#define OGS_LOG_DOMAIN __esm_log_domain
|
|
|
|
|
|
|
|
void esm_state_initial(ogs_fsm_t *s, mme_event_t *e)
|
2017-03-05 07:49:57 +00:00
|
|
|
{
|
2019-04-27 14:54:30 +00:00
|
|
|
ogs_assert(s);
|
2017-03-05 07:49:57 +00:00
|
|
|
|
2019-04-27 14:54:30 +00:00
|
|
|
mme_sm_debug(e);
|
2017-03-05 07:49:57 +00:00
|
|
|
|
2019-04-27 14:54:30 +00:00
|
|
|
OGS_FSM_TRAN(s, &esm_state_inactive);
|
2017-03-05 07:49:57 +00:00
|
|
|
}
|
|
|
|
|
2019-04-27 14:54:30 +00:00
|
|
|
void esm_state_final(ogs_fsm_t *s, mme_event_t *e)
|
2017-03-05 07:49:57 +00:00
|
|
|
{
|
2019-04-27 14:54:30 +00:00
|
|
|
ogs_assert(s);
|
2017-03-05 07:49:57 +00:00
|
|
|
|
2019-04-27 14:54:30 +00:00
|
|
|
mme_sm_debug(e);
|
2017-03-05 07:49:57 +00:00
|
|
|
}
|
|
|
|
|
2019-04-27 14:54:30 +00:00
|
|
|
void esm_state_inactive(ogs_fsm_t *s, mme_event_t *e)
|
2017-03-05 07:49:57 +00:00
|
|
|
{
|
2019-04-27 14:54:30 +00:00
|
|
|
int rv;
|
2017-09-03 15:06:39 +00:00
|
|
|
mme_ue_t *mme_ue = NULL;
|
2017-09-04 13:00:51 +00:00
|
|
|
mme_sess_t *sess = NULL;
|
|
|
|
mme_bearer_t *bearer = NULL;
|
2020-05-23 02:24:48 +00:00
|
|
|
ogs_nas_eps_message_t *message = NULL;
|
2017-09-03 15:06:39 +00:00
|
|
|
|
2019-04-27 14:54:30 +00:00
|
|
|
ogs_assert(s);
|
|
|
|
ogs_assert(e);
|
2017-03-05 07:49:57 +00:00
|
|
|
|
2019-04-27 14:54:30 +00:00
|
|
|
mme_sm_debug(e);
|
2017-03-05 07:49:57 +00:00
|
|
|
|
2019-04-27 14:54:30 +00:00
|
|
|
bearer = e->bearer;
|
|
|
|
ogs_assert(bearer);
|
2017-09-04 13:00:51 +00:00
|
|
|
sess = bearer->sess;
|
2019-04-27 14:54:30 +00:00
|
|
|
ogs_assert(sess);
|
2017-09-03 15:06:39 +00:00
|
|
|
mme_ue = sess->mme_ue;
|
2019-04-27 14:54:30 +00:00
|
|
|
ogs_assert(mme_ue);
|
2017-09-03 15:06:39 +00:00
|
|
|
|
2019-06-23 11:43:23 +00:00
|
|
|
switch (e->id) {
|
|
|
|
case OGS_FSM_ENTRY_SIG:
|
2019-07-20 14:06:54 +00:00
|
|
|
CLEAR_BEARER_ALL_TIMERS(bearer);
|
2019-06-23 11:43:23 +00:00
|
|
|
break;
|
|
|
|
case OGS_FSM_EXIT_SIG:
|
|
|
|
break;
|
|
|
|
case MME_EVT_ESM_MESSAGE:
|
|
|
|
message = e->nas_message;
|
|
|
|
ogs_assert(message);
|
|
|
|
|
|
|
|
switch (message->esm.h.message_type) {
|
2020-05-23 02:24:48 +00:00
|
|
|
case OGS_NAS_EPS_PDN_CONNECTIVITY_REQUEST:
|
2019-06-23 11:43:23 +00:00
|
|
|
ogs_debug("[ESM] PDN Connectivity request");
|
|
|
|
ogs_debug(" IMSI[%s] PTI[%d] EBI[%d]",
|
2020-08-30 03:27:54 +00:00
|
|
|
mme_ue->imsi_bcd, sess->pti, *(bearer->ebi));
|
2019-06-23 11:43:23 +00:00
|
|
|
rv = esm_handle_pdn_connectivity_request(
|
|
|
|
bearer, &message->esm.pdn_connectivity_request);
|
|
|
|
if (rv != OGS_OK) {
|
|
|
|
OGS_FSM_TRAN(s, esm_state_exception);
|
|
|
|
break;
|
|
|
|
}
|
2017-03-05 07:49:57 +00:00
|
|
|
break;
|
2020-05-23 02:24:48 +00:00
|
|
|
case OGS_NAS_EPS_ESM_INFORMATION_RESPONSE:
|
2019-06-23 11:43:23 +00:00
|
|
|
ogs_debug("[ESM] ESM information response");
|
|
|
|
ogs_debug(" IMSI[%s] PTI[%d] EBI[%d]",
|
2020-08-30 03:27:54 +00:00
|
|
|
mme_ue->imsi_bcd, sess->pti, *(bearer->ebi));
|
2019-07-20 14:06:54 +00:00
|
|
|
|
|
|
|
CLEAR_BEARER_TIMER(bearer->t3489);
|
2019-06-23 11:43:23 +00:00
|
|
|
rv = esm_handle_information_response(
|
|
|
|
sess, &message->esm.esm_information_response);
|
|
|
|
if (rv != OGS_OK) {
|
|
|
|
OGS_FSM_TRAN(s, esm_state_exception);
|
|
|
|
break;
|
|
|
|
}
|
2017-03-05 07:49:57 +00:00
|
|
|
break;
|
2020-05-23 02:24:48 +00:00
|
|
|
case OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_ACCEPT:
|
2019-06-23 11:43:23 +00:00
|
|
|
ogs_debug("[ESM] Activate default EPS bearer "
|
|
|
|
"context accept");
|
|
|
|
ogs_debug(" IMSI[%s] PTI[%d] EBI[%d]",
|
2020-08-30 03:27:54 +00:00
|
|
|
mme_ue->imsi_bcd, sess->pti, *(bearer->ebi));
|
2019-06-23 11:43:23 +00:00
|
|
|
/* Check if Initial Context Setup Response or
|
|
|
|
* E-RAB Setup Response is received */
|
|
|
|
if (MME_HAVE_ENB_S1U_PATH(bearer)) {
|
2019-11-30 07:45:09 +00:00
|
|
|
mme_gtp_send_modify_bearer_request(bearer, 0);
|
2017-03-05 09:09:34 +00:00
|
|
|
}
|
2019-06-23 11:43:23 +00:00
|
|
|
|
2020-05-23 02:24:48 +00:00
|
|
|
nas_eps_send_activate_all_dedicated_bearers(bearer);
|
2019-06-23 11:43:23 +00:00
|
|
|
OGS_FSM_TRAN(s, esm_state_active);
|
2017-03-05 07:49:57 +00:00
|
|
|
break;
|
2020-05-23 02:24:48 +00:00
|
|
|
case OGS_NAS_EPS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_ACCEPT:
|
2019-06-23 11:43:23 +00:00
|
|
|
ogs_debug("[ESM] Activate dedicated EPS bearer "
|
|
|
|
"context accept");
|
|
|
|
ogs_debug(" IMSI[%s] PTI[%d] EBI[%d]",
|
2020-08-30 03:27:54 +00:00
|
|
|
mme_ue->imsi_bcd, sess->pti, *(bearer->ebi));
|
2019-06-23 11:43:23 +00:00
|
|
|
/* Check if Initial Context Setup Response or
|
|
|
|
* E-RAB Setup Response is received */
|
|
|
|
if (MME_HAVE_ENB_S1U_PATH(bearer)) {
|
2019-11-30 07:45:09 +00:00
|
|
|
mme_gtp_send_create_bearer_response(bearer);
|
2019-06-23 11:43:23 +00:00
|
|
|
}
|
2017-03-05 07:49:57 +00:00
|
|
|
|
2019-06-23 11:43:23 +00:00
|
|
|
OGS_FSM_TRAN(s, esm_state_active);
|
|
|
|
break;
|
2017-03-05 07:49:57 +00:00
|
|
|
default:
|
2019-06-23 11:43:23 +00:00
|
|
|
ogs_error("Unknown message(type:%d)",
|
|
|
|
message->esm.h.message_type);
|
2017-03-05 07:49:57 +00:00
|
|
|
break;
|
|
|
|
}
|
2019-06-23 11:43:23 +00:00
|
|
|
break;
|
2019-07-20 14:06:54 +00:00
|
|
|
case MME_EVT_ESM_TIMER:
|
|
|
|
switch (e->timer_id) {
|
|
|
|
case MME_TIMER_T3489:
|
|
|
|
if (bearer->t3489.retry_count >=
|
|
|
|
mme_timer_cfg(MME_TIMER_T3489)->max_count) {
|
|
|
|
ogs_warn("[EMM] Retransmission of IMSI[%s] failed. "
|
|
|
|
"Stop retransmission",
|
|
|
|
mme_ue->imsi_bcd);
|
|
|
|
OGS_FSM_TRAN(&bearer->sm, &esm_state_exception);
|
|
|
|
|
2020-05-23 02:24:48 +00:00
|
|
|
nas_eps_send_pdn_connectivity_reject(sess,
|
2019-07-20 14:06:54 +00:00
|
|
|
ESM_CAUSE_ESM_INFORMATION_NOT_RECEIVED);
|
|
|
|
} else {
|
|
|
|
bearer->t3489.retry_count++;
|
2020-05-23 02:24:48 +00:00
|
|
|
nas_eps_send_esm_information_request(bearer);
|
2019-07-20 14:06:54 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
ogs_error("Unknown timer[%s:%d]",
|
|
|
|
mme_timer_get_name(e->timer_id), e->timer_id);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
2019-06-23 11:43:23 +00:00
|
|
|
default:
|
|
|
|
ogs_error("Unknown event %s", mme_event_get_name(e));
|
|
|
|
break;
|
2017-03-05 07:49:57 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-04-27 14:54:30 +00:00
|
|
|
void esm_state_active(ogs_fsm_t *s, mme_event_t *e)
|
2017-03-05 07:49:57 +00:00
|
|
|
{
|
2019-04-27 14:54:30 +00:00
|
|
|
int rv;
|
2017-09-05 03:37:27 +00:00
|
|
|
mme_ue_t *mme_ue = NULL;
|
|
|
|
mme_sess_t *sess = NULL;
|
|
|
|
mme_bearer_t *bearer = NULL;
|
2020-05-23 02:24:48 +00:00
|
|
|
ogs_nas_eps_message_t *message = NULL;
|
2017-09-05 03:37:27 +00:00
|
|
|
|
2019-04-27 14:54:30 +00:00
|
|
|
ogs_assert(s);
|
|
|
|
ogs_assert(e);
|
2017-03-05 07:49:57 +00:00
|
|
|
|
2019-04-27 14:54:30 +00:00
|
|
|
mme_sm_debug(e);
|
2017-03-05 07:49:57 +00:00
|
|
|
|
2019-04-27 14:54:30 +00:00
|
|
|
bearer = e->bearer;
|
|
|
|
ogs_assert(bearer);
|
2017-09-05 03:37:27 +00:00
|
|
|
sess = bearer->sess;
|
2019-04-27 14:54:30 +00:00
|
|
|
ogs_assert(sess);
|
2017-09-05 03:37:27 +00:00
|
|
|
mme_ue = sess->mme_ue;
|
2019-04-27 14:54:30 +00:00
|
|
|
ogs_assert(mme_ue);
|
2017-09-05 03:37:27 +00:00
|
|
|
|
2019-06-23 11:43:23 +00:00
|
|
|
switch (e->id) {
|
|
|
|
case OGS_FSM_ENTRY_SIG:
|
|
|
|
break;
|
|
|
|
case OGS_FSM_EXIT_SIG:
|
|
|
|
break;
|
|
|
|
case MME_EVT_ESM_MESSAGE:
|
|
|
|
message = e->nas_message;
|
|
|
|
ogs_assert(message);
|
|
|
|
|
|
|
|
switch (message->esm.h.message_type) {
|
2020-05-23 02:24:48 +00:00
|
|
|
case OGS_NAS_EPS_PDN_CONNECTIVITY_REQUEST:
|
2019-06-23 11:43:23 +00:00
|
|
|
ogs_debug("[ESM] PDN Connectivity request");
|
|
|
|
ogs_debug(" IMSI[%s] PTI[%d] EBI[%d]",
|
2020-08-30 03:27:54 +00:00
|
|
|
mme_ue->imsi_bcd, sess->pti, *(bearer->ebi));
|
2019-06-23 11:43:23 +00:00
|
|
|
rv = esm_handle_pdn_connectivity_request(
|
|
|
|
bearer, &message->esm.pdn_connectivity_request);
|
|
|
|
if (rv != OGS_OK) {
|
|
|
|
OGS_FSM_TRAN(s, esm_state_exception);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
OGS_FSM_TRAN(s, esm_state_inactive);
|
2017-03-05 07:49:57 +00:00
|
|
|
break;
|
2020-05-23 02:24:48 +00:00
|
|
|
case OGS_NAS_EPS_PDN_DISCONNECT_REQUEST:
|
2019-06-23 11:43:23 +00:00
|
|
|
ogs_debug("[ESM] PDN disconnect request");
|
|
|
|
ogs_debug(" IMSI[%s] PTI[%d] EBI[%d]",
|
2020-08-30 03:27:54 +00:00
|
|
|
mme_ue->imsi_bcd, sess->pti, *(bearer->ebi));
|
2019-06-23 11:43:23 +00:00
|
|
|
if (MME_HAVE_SGW_S1U_PATH(sess)) {
|
2019-11-30 07:45:09 +00:00
|
|
|
mme_gtp_send_delete_session_request(sess);
|
2019-06-23 11:43:23 +00:00
|
|
|
} else {
|
2020-05-23 02:24:48 +00:00
|
|
|
nas_eps_send_deactivate_bearer_context_request(bearer);
|
2017-09-07 13:22:42 +00:00
|
|
|
}
|
2019-06-23 11:43:23 +00:00
|
|
|
OGS_FSM_TRAN(s, esm_state_pdn_will_disconnect);
|
2017-09-07 13:22:42 +00:00
|
|
|
break;
|
2020-05-23 02:24:48 +00:00
|
|
|
case OGS_NAS_EPS_MODIFY_EPS_BEARER_CONTEXT_ACCEPT:
|
2019-06-23 11:43:23 +00:00
|
|
|
ogs_debug("[ESM] Modify EPS bearer context accept");
|
|
|
|
ogs_debug(" IMSI[%s] PTI[%d] EBI[%d]",
|
2020-08-30 03:27:54 +00:00
|
|
|
mme_ue->imsi_bcd, sess->pti, *(bearer->ebi));
|
2017-09-07 13:22:42 +00:00
|
|
|
|
2019-11-30 07:45:09 +00:00
|
|
|
mme_gtp_send_update_bearer_response(bearer);
|
2019-06-23 11:43:23 +00:00
|
|
|
break;
|
2020-05-23 02:24:48 +00:00
|
|
|
case OGS_NAS_EPS_DEACTIVATE_EPS_BEARER_CONTEXT_ACCEPT:
|
2019-12-28 12:46:30 +00:00
|
|
|
ogs_debug("[ESM] Deactivate EPS bearer "
|
2019-06-23 11:43:23 +00:00
|
|
|
"context accept");
|
|
|
|
ogs_debug(" IMSI[%s] PTI[%d] EBI[%d]",
|
2020-08-30 03:27:54 +00:00
|
|
|
mme_ue->imsi_bcd, sess->pti, *(bearer->ebi));
|
2019-11-30 07:45:09 +00:00
|
|
|
mme_gtp_send_delete_bearer_response(bearer);
|
2019-06-23 11:43:23 +00:00
|
|
|
OGS_FSM_TRAN(s, esm_state_bearer_deactivated);
|
|
|
|
break;
|
2020-05-23 02:24:48 +00:00
|
|
|
case OGS_NAS_EPS_BEARER_RESOURCE_ALLOCATION_REQUEST:
|
2019-12-28 12:46:30 +00:00
|
|
|
ogs_debug("[ESM] Bearer resource allocation request");
|
|
|
|
ogs_debug(" IMSI[%s] PTI[%d] EBI[%d]",
|
2020-08-30 03:27:54 +00:00
|
|
|
mme_ue->imsi_bcd, sess->pti, *(bearer->ebi));
|
2019-12-28 12:46:30 +00:00
|
|
|
esm_handle_bearer_resource_allocation_request(bearer, message);
|
|
|
|
break;
|
2020-05-23 02:24:48 +00:00
|
|
|
case OGS_NAS_EPS_BEARER_RESOURCE_MODIFICATION_REQUEST:
|
2019-12-28 12:46:30 +00:00
|
|
|
ogs_debug("[ESM] Bearer resource modification request");
|
|
|
|
ogs_debug(" IMSI[%s] PTI[%d] EBI[%d]",
|
2020-08-30 03:27:54 +00:00
|
|
|
mme_ue->imsi_bcd, sess->pti, *(bearer->ebi));
|
2019-12-28 12:46:30 +00:00
|
|
|
esm_handle_bearer_resource_modification_request(bearer, message);
|
|
|
|
break;
|
2017-09-07 13:22:42 +00:00
|
|
|
default:
|
2019-06-23 11:43:23 +00:00
|
|
|
ogs_error("Unknown message(type:%d)",
|
|
|
|
message->esm.h.message_type);
|
2017-09-07 13:22:42 +00:00
|
|
|
break;
|
|
|
|
}
|
2019-06-23 11:43:23 +00:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
ogs_error("Unknown event %s", mme_event_get_name(e));
|
|
|
|
break;
|
2017-09-07 13:22:42 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-04-27 14:54:30 +00:00
|
|
|
void esm_state_pdn_will_disconnect(ogs_fsm_t *s, mme_event_t *e)
|
2017-09-07 13:22:42 +00:00
|
|
|
{
|
|
|
|
mme_ue_t *mme_ue = NULL;
|
|
|
|
mme_sess_t *sess = NULL;
|
|
|
|
mme_bearer_t *bearer = NULL;
|
2020-05-23 02:24:48 +00:00
|
|
|
ogs_nas_eps_message_t *message = NULL;
|
2017-09-07 13:22:42 +00:00
|
|
|
|
2019-04-27 14:54:30 +00:00
|
|
|
ogs_assert(s);
|
|
|
|
ogs_assert(e);
|
2017-09-07 13:22:42 +00:00
|
|
|
|
2019-04-27 14:54:30 +00:00
|
|
|
mme_sm_debug(e);
|
2017-09-07 13:22:42 +00:00
|
|
|
|
2019-04-27 14:54:30 +00:00
|
|
|
bearer = e->bearer;
|
|
|
|
ogs_assert(bearer);
|
2017-09-07 13:22:42 +00:00
|
|
|
sess = bearer->sess;
|
2019-04-27 14:54:30 +00:00
|
|
|
ogs_assert(sess);
|
2017-09-07 13:22:42 +00:00
|
|
|
mme_ue = sess->mme_ue;
|
2019-04-27 14:54:30 +00:00
|
|
|
ogs_assert(mme_ue);
|
2017-09-07 13:22:42 +00:00
|
|
|
|
2019-06-23 11:43:23 +00:00
|
|
|
switch (e->id) {
|
|
|
|
case OGS_FSM_ENTRY_SIG:
|
|
|
|
break;
|
|
|
|
case OGS_FSM_EXIT_SIG:
|
|
|
|
break;
|
|
|
|
case MME_EVT_ESM_MESSAGE:
|
|
|
|
message = e->nas_message;
|
|
|
|
ogs_assert(message);
|
|
|
|
|
|
|
|
switch (message->esm.h.message_type) {
|
2020-05-23 02:24:48 +00:00
|
|
|
case OGS_NAS_EPS_DEACTIVATE_EPS_BEARER_CONTEXT_ACCEPT:
|
2019-06-23 11:43:23 +00:00
|
|
|
ogs_debug("[ESM] [D] Deactivate EPS bearer "
|
|
|
|
"context accept");
|
|
|
|
ogs_debug(" IMSI[%s] PTI[%d] EBI[%d]",
|
2020-08-30 03:27:54 +00:00
|
|
|
mme_ue->imsi_bcd, sess->pti, *(bearer->ebi));
|
2019-06-23 11:43:23 +00:00
|
|
|
OGS_FSM_TRAN(s, esm_state_pdn_did_disconnect);
|
2017-09-05 03:37:27 +00:00
|
|
|
break;
|
2017-03-05 07:49:57 +00:00
|
|
|
default:
|
2019-06-23 11:43:23 +00:00
|
|
|
ogs_error("Unknown message(type:%d)",
|
|
|
|
message->esm.h.message_type);
|
2017-03-05 07:49:57 +00:00
|
|
|
break;
|
|
|
|
}
|
2019-06-23 11:43:23 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
ogs_error("Unknown event %s", mme_event_get_name(e));
|
|
|
|
break;
|
2017-03-05 07:49:57 +00:00
|
|
|
}
|
|
|
|
}
|
2017-09-05 03:37:27 +00:00
|
|
|
|
2019-04-27 14:54:30 +00:00
|
|
|
void esm_state_pdn_did_disconnect(ogs_fsm_t *s, mme_event_t *e)
|
2018-01-16 13:14:59 +00:00
|
|
|
{
|
2019-04-27 14:54:30 +00:00
|
|
|
ogs_assert(e);
|
|
|
|
mme_sm_debug(e);
|
2018-01-16 13:14:59 +00:00
|
|
|
|
2019-06-23 11:43:23 +00:00
|
|
|
switch (e->id) {
|
|
|
|
case OGS_FSM_ENTRY_SIG:
|
|
|
|
break;
|
|
|
|
case OGS_FSM_EXIT_SIG:
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
ogs_error("Unknown event %s", mme_event_get_name(e));
|
|
|
|
break;
|
2018-01-16 13:14:59 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-04-27 14:54:30 +00:00
|
|
|
void esm_state_bearer_deactivated(ogs_fsm_t *s, mme_event_t *e)
|
2017-09-06 15:37:16 +00:00
|
|
|
{
|
2019-04-27 14:54:30 +00:00
|
|
|
ogs_assert(e);
|
|
|
|
mme_sm_debug(e);
|
2017-09-11 09:41:14 +00:00
|
|
|
|
2019-06-23 11:43:23 +00:00
|
|
|
switch (e->id) {
|
|
|
|
case OGS_FSM_ENTRY_SIG:
|
|
|
|
break;
|
|
|
|
case OGS_FSM_EXIT_SIG:
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
ogs_error("Unknown event %s", mme_event_get_name(e));
|
|
|
|
break;
|
2017-09-06 15:37:16 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-04-27 14:54:30 +00:00
|
|
|
void esm_state_exception(ogs_fsm_t *s, mme_event_t *e)
|
2017-09-06 15:37:16 +00:00
|
|
|
{
|
2019-07-20 14:06:54 +00:00
|
|
|
mme_bearer_t *bearer = NULL;
|
2019-04-27 14:54:30 +00:00
|
|
|
ogs_assert(e);
|
|
|
|
mme_sm_debug(e);
|
2017-09-11 09:41:14 +00:00
|
|
|
|
2019-07-20 14:06:54 +00:00
|
|
|
bearer = e->bearer;
|
|
|
|
|
2019-06-23 11:43:23 +00:00
|
|
|
switch (e->id) {
|
|
|
|
case OGS_FSM_ENTRY_SIG:
|
2019-07-20 14:06:54 +00:00
|
|
|
CLEAR_BEARER_ALL_TIMERS(bearer);
|
2019-06-23 11:43:23 +00:00
|
|
|
break;
|
|
|
|
case OGS_FSM_EXIT_SIG:
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
ogs_error("Unknown event %s", mme_event_get_name(e));
|
|
|
|
break;
|
2017-09-06 15:37:16 +00:00
|
|
|
}
|
|
|
|
}
|