2019-07-11 12:53:54 +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/>.
|
|
|
|
*/
|
|
|
|
|
2019-06-11 13:10:47 +00:00
|
|
|
#include "nas-path.h"
|
2019-06-01 09:52:38 +00:00
|
|
|
#include "s1ap-path.h"
|
2017-08-25 15:11:46 +00:00
|
|
|
|
2019-06-11 13:10:47 +00:00
|
|
|
#include "mme-sm.h"
|
|
|
|
#include "mme-s6a-handler.h"
|
2017-09-10 14:03:24 +00:00
|
|
|
|
2019-09-13 12:07:47 +00:00
|
|
|
void mme_s6a_handle_aia(mme_ue_t *mme_ue,
|
|
|
|
ogs_diam_s6a_aia_message_t *aia_message)
|
2017-08-25 15:11:46 +00:00
|
|
|
{
|
2019-09-13 12:07:47 +00:00
|
|
|
ogs_diam_e_utran_vector_t *e_utran_vector = NULL;
|
2017-08-25 15:11:46 +00:00
|
|
|
|
2019-04-27 14:54:30 +00:00
|
|
|
ogs_assert(mme_ue);
|
|
|
|
ogs_assert(aia_message);
|
2017-08-25 15:11:46 +00:00
|
|
|
e_utran_vector = &aia_message->e_utran_vector;
|
2019-04-27 14:54:30 +00:00
|
|
|
ogs_assert(e_utran_vector);
|
2017-08-25 15:11:46 +00:00
|
|
|
|
|
|
|
mme_ue->xres_len = e_utran_vector->xres_len;
|
|
|
|
memcpy(mme_ue->xres, e_utran_vector->xres, mme_ue->xres_len);
|
2019-04-27 14:54:30 +00:00
|
|
|
memcpy(mme_ue->kasme, e_utran_vector->kasme, OGS_SHA256_DIGEST_SIZE);
|
2019-09-13 12:07:47 +00:00
|
|
|
memcpy(mme_ue->rand, e_utran_vector->rand, OGS_RAND_LEN);
|
2020-10-08 01:21:48 +00:00
|
|
|
memcpy(mme_ue->autn, e_utran_vector->autn, OGS_AUTN_LEN);
|
2017-08-25 15:25:55 +00:00
|
|
|
|
2019-07-20 12:28:36 +00:00
|
|
|
CLEAR_MME_UE_TIMER(mme_ue->t3460);
|
|
|
|
|
2020-06-23 04:35:41 +00:00
|
|
|
if (mme_ue->nas_eps.ksi == OGS_NAS_KSI_NO_KEY_IS_AVAILABLE)
|
|
|
|
mme_ue->nas_eps.ksi = 0;
|
|
|
|
|
2020-10-08 01:21:48 +00:00
|
|
|
nas_eps_send_authentication_request(mme_ue);
|
2017-08-25 15:11:46 +00:00
|
|
|
}
|
|
|
|
|
2019-09-13 12:07:47 +00:00
|
|
|
void mme_s6a_handle_ula(mme_ue_t *mme_ue,
|
|
|
|
ogs_diam_s6a_ula_message_t *ula_message)
|
2017-08-25 15:11:46 +00:00
|
|
|
{
|
2020-06-18 01:43:16 +00:00
|
|
|
ogs_subscription_data_t *subscription_data = NULL;
|
2017-08-25 15:11:46 +00:00
|
|
|
|
2019-04-27 14:54:30 +00:00
|
|
|
ogs_assert(mme_ue);
|
|
|
|
ogs_assert(ula_message);
|
2017-08-25 15:11:46 +00:00
|
|
|
subscription_data = &ula_message->subscription_data;
|
2019-04-27 14:54:30 +00:00
|
|
|
ogs_assert(subscription_data);
|
2017-08-25 15:11:46 +00:00
|
|
|
|
|
|
|
memcpy(&mme_ue->subscription_data,
|
2020-06-18 01:43:16 +00:00
|
|
|
subscription_data, sizeof(ogs_subscription_data_t));
|
2017-08-25 15:11:46 +00:00
|
|
|
}
|