mirror of
https://github.com/open5gs/open5gs.git
synced 2025-11-07 15:33:13 +00:00
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5fad2f0e5c | ||
|
|
e69cea9b5b | ||
|
|
6f9e45a332 | ||
|
|
9357381839 | ||
|
|
84e7f50b3f | ||
|
|
2bc92c5ac8 | ||
|
|
2429a4e363 | ||
|
|
dab0f3ef3a | ||
|
|
144548f4c0 | ||
|
|
1f44efbc3d | ||
|
|
02712a38e6 | ||
|
|
888cbfbdb8 | ||
|
|
cdf7fb94bf |
@@ -8,7 +8,7 @@ dnl This program is distributed in the hope that it will be useful, but
|
|||||||
dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||||
dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
AC_INIT([NextEPC], [0.3.4], [acetcom@gmail.com])
|
AC_INIT([NextEPC], [0.3.5], [acetcom@gmail.com])
|
||||||
|
|
||||||
AC_SUBST(LIBVERSION)
|
AC_SUBST(LIBVERSION)
|
||||||
LIBVERSION=1:0:0
|
LIBVERSION=1:0:0
|
||||||
|
|||||||
12
debian/changelog
vendored
12
debian/changelog
vendored
@@ -1,3 +1,15 @@
|
|||||||
|
nextepc (0.3.5~xenial) xenial; urgency=medium
|
||||||
|
|
||||||
|
* Bug Fixed
|
||||||
|
|
||||||
|
-- Sukchan Lee <acetcom@gmail.com> Tue, 06 Mar 2018 12:41:53 +0000
|
||||||
|
|
||||||
|
nextepc (0.3.5~artful) artful; urgency=medium
|
||||||
|
|
||||||
|
* Bug Fixed
|
||||||
|
|
||||||
|
-- Sukchan Lee <acetcom@gmail.com> Tue, 06 Mar 2018 12:40:07 +0000
|
||||||
|
|
||||||
nextepc (0.3.4-1~xenial) xenial; urgency=medium
|
nextepc (0.3.4-1~xenial) xenial; urgency=medium
|
||||||
|
|
||||||
* Bug Fixed
|
* Bug Fixed
|
||||||
|
|||||||
@@ -172,6 +172,14 @@ static int s1ap_decode_initiating(s1ap_message_t *message,
|
|||||||
s1ap_xer_print_s1ap_errorindication,
|
s1ap_xer_print_s1ap_errorindication,
|
||||||
s1ap_xer__print2sp, message);
|
s1ap_xer__print2sp, message);
|
||||||
break;
|
break;
|
||||||
|
case S1ap_ProcedureCode_id_Reset:
|
||||||
|
ret = s1ap_decode_s1ap_reseties(
|
||||||
|
&message->s1ap_ResetIEs,
|
||||||
|
&initiating_p->value);
|
||||||
|
s1ap_decode_xer_print_message(
|
||||||
|
s1ap_xer_print_s1ap_reset,
|
||||||
|
s1ap_xer__print2sp, message);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
d_error("Unknown procedure ID (%d) for initiating message",
|
d_error("Unknown procedure ID (%d) for initiating message",
|
||||||
(int)initiating_p->procedureCode);
|
(int)initiating_p->procedureCode);
|
||||||
@@ -254,6 +262,15 @@ static int s1ap_decode_successfull_outcome(s1ap_message_t *message,
|
|||||||
s1ap_xer__print2sp, message);
|
s1ap_xer__print2sp, message);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case S1ap_ProcedureCode_id_Reset:
|
||||||
|
ret = s1ap_decode_s1ap_resetacknowledgeies(
|
||||||
|
&message->s1ap_ResetAcknowledgeIEs,
|
||||||
|
&successfullOutcome_p->value);
|
||||||
|
s1ap_decode_xer_print_message(
|
||||||
|
s1ap_xer_print_s1ap_resetacknowledge,
|
||||||
|
s1ap_xer__print2sp, message);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
d_error("Unknown procedure ID (%ld) for successfull "
|
d_error("Unknown procedure ID (%ld) for successfull "
|
||||||
"outcome message", successfullOutcome_p->procedureCode);
|
"outcome message", successfullOutcome_p->procedureCode);
|
||||||
|
|||||||
@@ -58,6 +58,10 @@ static inline int s1ap_encode_mme_status_transfer(
|
|||||||
|
|
||||||
static inline int s1ap_encode_error_indication(
|
static inline int s1ap_encode_error_indication(
|
||||||
s1ap_message_t *message_p, pkbuf_t *pkbuf);
|
s1ap_message_t *message_p, pkbuf_t *pkbuf);
|
||||||
|
static inline int s1ap_encode_reset(
|
||||||
|
s1ap_message_t *message_p, pkbuf_t *pkbuf);
|
||||||
|
static inline int s1ap_encode_reset_ack(
|
||||||
|
s1ap_message_t *message_p, pkbuf_t *pkbuf);
|
||||||
|
|
||||||
static void s1ap_encode_xer_print_message(
|
static void s1ap_encode_xer_print_message(
|
||||||
asn_enc_rval_t (*func)(asn_app_consume_bytes_f *cb,
|
asn_enc_rval_t (*func)(asn_app_consume_bytes_f *cb,
|
||||||
@@ -191,6 +195,12 @@ static inline int s1ap_encode_initiating_message(
|
|||||||
ret = s1ap_encode_error_indication(message_p, pkbuf);
|
ret = s1ap_encode_error_indication(message_p, pkbuf);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case S1ap_ProcedureCode_id_Reset:
|
||||||
|
s1ap_encode_xer_print_message(s1ap_xer_print_s1ap_reset,
|
||||||
|
s1ap_xer__print2sp, message_p);
|
||||||
|
ret = s1ap_encode_reset(message_p, pkbuf);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
d_warn("Unknown procedure ID (%d) for initiating message_p\n",
|
d_warn("Unknown procedure ID (%d) for initiating message_p\n",
|
||||||
(int)message_p->procedureCode);
|
(int)message_p->procedureCode);
|
||||||
@@ -255,6 +265,12 @@ static inline int s1ap_encode_successfull_outcome(
|
|||||||
ret = s1ap_encode_handover_cancel_ack(message_p, pkbuf);
|
ret = s1ap_encode_handover_cancel_ack(message_p, pkbuf);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case S1ap_ProcedureCode_id_Reset:
|
||||||
|
s1ap_encode_xer_print_message(s1ap_xer_print_s1ap_resetacknowledge,
|
||||||
|
s1ap_xer__print2sp, message_p);
|
||||||
|
ret = s1ap_encode_reset_ack(message_p, pkbuf);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
d_warn("Unknown procedure ID (%d) for successfull "
|
d_warn("Unknown procedure ID (%d) for successfull "
|
||||||
"outcome message\n", (int)message_p->procedureCode);
|
"outcome message\n", (int)message_p->procedureCode);
|
||||||
@@ -1125,6 +1141,79 @@ static inline int s1ap_encode_error_indication(
|
|||||||
return enc_ret.encoded;
|
return enc_ret.encoded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline int s1ap_encode_reset(s1ap_message_t *message_p, pkbuf_t *pkbuf)
|
||||||
|
{
|
||||||
|
asn_enc_rval_t enc_ret = {0};
|
||||||
|
|
||||||
|
S1AP_PDU_t pdu;
|
||||||
|
S1ap_Reset_t reset;
|
||||||
|
asn_TYPE_descriptor_t *td = &asn_DEF_S1ap_Reset;
|
||||||
|
|
||||||
|
memset(&reset, 0, sizeof(S1ap_Reset_t));
|
||||||
|
if (s1ap_encode_s1ap_reseties(
|
||||||
|
&reset, &message_p->s1ap_ResetIEs) < 0)
|
||||||
|
{
|
||||||
|
d_error("Encoding of %s failed", td->name);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
memset(&pdu, 0, sizeof (S1AP_PDU_t));
|
||||||
|
pdu.present = S1AP_PDU_PR_initiatingMessage;
|
||||||
|
pdu.choice.initiatingMessage.procedureCode = message_p->procedureCode;
|
||||||
|
pdu.choice.initiatingMessage.criticality = S1ap_Criticality_reject;
|
||||||
|
ANY_fromType_aper(&pdu.choice.initiatingMessage.value, td, &reset);
|
||||||
|
|
||||||
|
enc_ret = aper_encode_to_buffer(&asn_DEF_S1AP_PDU,
|
||||||
|
&pdu, pkbuf->payload, MAX_SDU_LEN);
|
||||||
|
|
||||||
|
ASN_STRUCT_FREE_CONTENTS_ONLY(*td, &reset);
|
||||||
|
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_S1AP_PDU, &pdu);
|
||||||
|
|
||||||
|
if (enc_ret.encoded < 0)
|
||||||
|
{
|
||||||
|
d_error("Encoding of %s failed", td->name);
|
||||||
|
}
|
||||||
|
|
||||||
|
return enc_ret.encoded;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int s1ap_encode_reset_ack(
|
||||||
|
s1ap_message_t *message_p, pkbuf_t *pkbuf)
|
||||||
|
{
|
||||||
|
asn_enc_rval_t enc_ret = {0};
|
||||||
|
|
||||||
|
S1AP_PDU_t pdu;
|
||||||
|
S1ap_ResetAcknowledge_t ack;
|
||||||
|
asn_TYPE_descriptor_t *td = &asn_DEF_S1ap_ResetAcknowledge;
|
||||||
|
|
||||||
|
memset(&ack, 0, sizeof(S1ap_ResetAcknowledge_t));
|
||||||
|
if (s1ap_encode_s1ap_resetacknowledgeies(
|
||||||
|
&ack, &message_p->s1ap_ResetAcknowledgeIEs) < 0)
|
||||||
|
{
|
||||||
|
d_error("Encoding of %s failed", td->name);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
memset(&pdu, 0, sizeof (S1AP_PDU_t));
|
||||||
|
pdu.present = S1AP_PDU_PR_successfulOutcome;
|
||||||
|
pdu.choice.successfulOutcome.procedureCode = message_p->procedureCode;
|
||||||
|
pdu.choice.successfulOutcome.criticality = S1ap_Criticality_reject;
|
||||||
|
ANY_fromType_aper(&pdu.choice.successfulOutcome.value, td, &ack);
|
||||||
|
|
||||||
|
enc_ret = aper_encode_to_buffer(&asn_DEF_S1AP_PDU,
|
||||||
|
&pdu, pkbuf->payload, MAX_SDU_LEN);
|
||||||
|
|
||||||
|
ASN_STRUCT_FREE_CONTENTS_ONLY(*td, &ack);
|
||||||
|
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_S1AP_PDU, &pdu);
|
||||||
|
|
||||||
|
if (enc_ret.encoded < 0)
|
||||||
|
{
|
||||||
|
d_error("Encoding of %s failed", td->name);
|
||||||
|
}
|
||||||
|
|
||||||
|
return enc_ret.encoded;
|
||||||
|
}
|
||||||
|
|
||||||
static void s1ap_encode_xer_print_message(
|
static void s1ap_encode_xer_print_message(
|
||||||
asn_enc_rval_t (*func)(asn_app_consume_bytes_f *cb,
|
asn_enc_rval_t (*func)(asn_app_consume_bytes_f *cb,
|
||||||
void *app_key, s1ap_message_t *message_p),
|
void *app_key, s1ap_message_t *message_p),
|
||||||
|
|||||||
@@ -140,6 +140,11 @@ static inline int s1ap_free_initiating_message(s1ap_message_t *message)
|
|||||||
&message->s1ap_ErrorIndicationIEs);
|
&message->s1ap_ErrorIndicationIEs);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case S1ap_ProcedureCode_id_Reset:
|
||||||
|
s1ap_free_s1ap_reseties(
|
||||||
|
&message->s1ap_ResetIEs);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
d_warn("Unknown procedure ID (%d) for initiating message\n",
|
d_warn("Unknown procedure ID (%d) for initiating message\n",
|
||||||
(int)message->procedureCode);
|
(int)message->procedureCode);
|
||||||
@@ -203,6 +208,11 @@ static inline int s1ap_free_successfull_outcome(s1ap_message_t *message)
|
|||||||
&message->s1ap_HandoverCommandIEs);
|
&message->s1ap_HandoverCommandIEs);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case S1ap_ProcedureCode_id_Reset:
|
||||||
|
s1ap_free_s1ap_resetacknowledgeies(
|
||||||
|
&message->s1ap_ResetAcknowledgeIEs);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
d_warn("Unknown procedure ID (%d) for successfull "
|
d_warn("Unknown procedure ID (%d) for successfull "
|
||||||
"outcome message\n", (int)message->procedureCode);
|
"outcome message\n", (int)message->procedureCode);
|
||||||
|
|||||||
@@ -252,20 +252,40 @@ status_t emm_build_security_mode_command(
|
|||||||
nas_key_set_identifier->tsc = 0;
|
nas_key_set_identifier->tsc = 0;
|
||||||
nas_key_set_identifier->nas_key_set_identifier = 0;
|
nas_key_set_identifier->nas_key_set_identifier = 0;
|
||||||
|
|
||||||
replayed_ue_security_capabilities->length =
|
|
||||||
sizeof(replayed_ue_security_capabilities->eea) +
|
|
||||||
sizeof(replayed_ue_security_capabilities->eia) +
|
|
||||||
sizeof(replayed_ue_security_capabilities->uea) +
|
|
||||||
sizeof(replayed_ue_security_capabilities->uia) +
|
|
||||||
sizeof(replayed_ue_security_capabilities->gea);
|
|
||||||
replayed_ue_security_capabilities->eea = mme_ue->ue_network_capability.eea;
|
replayed_ue_security_capabilities->eea = mme_ue->ue_network_capability.eea;
|
||||||
replayed_ue_security_capabilities->eia = mme_ue->ue_network_capability.eia;
|
replayed_ue_security_capabilities->eia = mme_ue->ue_network_capability.eia;
|
||||||
replayed_ue_security_capabilities->uea = mme_ue->ue_network_capability.uea;
|
replayed_ue_security_capabilities->uea = mme_ue->ue_network_capability.uea;
|
||||||
replayed_ue_security_capabilities->uia = mme_ue->ue_network_capability.uia;
|
replayed_ue_security_capabilities->uia =
|
||||||
|
mme_ue->ue_network_capability.uia & 0x7f;
|
||||||
replayed_ue_security_capabilities->gea =
|
replayed_ue_security_capabilities->gea =
|
||||||
(mme_ue->ms_network_capability.gea1 << 6) |
|
(mme_ue->ms_network_capability.gea1 << 6) |
|
||||||
mme_ue->ms_network_capability.extended_gea;
|
mme_ue->ms_network_capability.extended_gea;
|
||||||
|
|
||||||
|
replayed_ue_security_capabilities->length =
|
||||||
|
sizeof(replayed_ue_security_capabilities->eea) +
|
||||||
|
sizeof(replayed_ue_security_capabilities->eia);
|
||||||
|
if (replayed_ue_security_capabilities->uea ||
|
||||||
|
replayed_ue_security_capabilities->uia)
|
||||||
|
replayed_ue_security_capabilities->length =
|
||||||
|
sizeof(replayed_ue_security_capabilities->eea) +
|
||||||
|
sizeof(replayed_ue_security_capabilities->eia) +
|
||||||
|
sizeof(replayed_ue_security_capabilities->uea) +
|
||||||
|
sizeof(replayed_ue_security_capabilities->uia);
|
||||||
|
if (replayed_ue_security_capabilities->gea)
|
||||||
|
replayed_ue_security_capabilities->length =
|
||||||
|
sizeof(replayed_ue_security_capabilities->eea) +
|
||||||
|
sizeof(replayed_ue_security_capabilities->eia) +
|
||||||
|
sizeof(replayed_ue_security_capabilities->uea) +
|
||||||
|
sizeof(replayed_ue_security_capabilities->uia) +
|
||||||
|
sizeof(replayed_ue_security_capabilities->gea);
|
||||||
|
d_trace(5, " SEC[LEN:%d EEA:0x%x EIA:0x%x UEA:0x%x UIA:0x%x GEA:0x%x]\n",
|
||||||
|
replayed_ue_security_capabilities->length,
|
||||||
|
replayed_ue_security_capabilities->eea,
|
||||||
|
replayed_ue_security_capabilities->eia,
|
||||||
|
replayed_ue_security_capabilities->uea,
|
||||||
|
replayed_ue_security_capabilities->uia,
|
||||||
|
replayed_ue_security_capabilities->gea);
|
||||||
|
|
||||||
mme_kdf_nas(MME_KDF_NAS_INT_ALG, mme_ue->selected_int_algorithm,
|
mme_kdf_nas(MME_KDF_NAS_INT_ALG, mme_ue->selected_int_algorithm,
|
||||||
mme_ue->kasme, mme_ue->knas_int);
|
mme_ue->kasme, mme_ue->knas_int);
|
||||||
mme_kdf_nas(MME_KDF_NAS_ENC_ALG, mme_ue->selected_enc_algorithm,
|
mme_kdf_nas(MME_KDF_NAS_ENC_ALG, mme_ue->selected_enc_algorithm,
|
||||||
|
|||||||
@@ -112,9 +112,14 @@ status_t emm_handle_attach_request(
|
|||||||
memcpy(&mme_ue->ue_network_capability,
|
memcpy(&mme_ue->ue_network_capability,
|
||||||
&attach_request->ue_network_capability,
|
&attach_request->ue_network_capability,
|
||||||
sizeof(attach_request->ue_network_capability));
|
sizeof(attach_request->ue_network_capability));
|
||||||
memcpy(&mme_ue->ms_network_capability,
|
|
||||||
&attach_request->ms_network_capability,
|
if (attach_request->presencemask &
|
||||||
sizeof(attach_request->ms_network_capability));
|
NAS_ATTACH_REQUEST_MS_NETWORK_CAPABILITY_PRESENT)
|
||||||
|
{
|
||||||
|
memcpy(&mme_ue->ms_network_capability,
|
||||||
|
&attach_request->ms_network_capability,
|
||||||
|
sizeof(attach_request->ms_network_capability));
|
||||||
|
}
|
||||||
|
|
||||||
switch(eps_mobile_identity->imsi.type)
|
switch(eps_mobile_identity->imsi.type)
|
||||||
{
|
{
|
||||||
@@ -195,7 +200,8 @@ status_t emm_handle_attach_complete(
|
|||||||
NAS_EMM_INFORMATION_UNIVERSAL_TIME_AND_LOCAL_TIME_ZONE_PRESENT;
|
NAS_EMM_INFORMATION_UNIVERSAL_TIME_AND_LOCAL_TIME_ZONE_PRESENT;
|
||||||
universal_time_and_local_time_zone->year =
|
universal_time_and_local_time_zone->year =
|
||||||
NAS_TIME_TO_BCD(time_exp.tm_year % 100);
|
NAS_TIME_TO_BCD(time_exp.tm_year % 100);
|
||||||
universal_time_and_local_time_zone->mon = NAS_TIME_TO_BCD(time_exp.tm_mon);
|
universal_time_and_local_time_zone->mon =
|
||||||
|
NAS_TIME_TO_BCD(time_exp.tm_mon+1);
|
||||||
universal_time_and_local_time_zone->mday =
|
universal_time_and_local_time_zone->mday =
|
||||||
NAS_TIME_TO_BCD(time_exp.tm_mday);
|
NAS_TIME_TO_BCD(time_exp.tm_mday);
|
||||||
universal_time_and_local_time_zone->hour =
|
universal_time_and_local_time_zone->hour =
|
||||||
@@ -214,6 +220,22 @@ status_t emm_handle_attach_complete(
|
|||||||
NAS_EMM_INFORMATION_NETWORK_DAYLIGHT_SAVING_TIME_PRESENT;
|
NAS_EMM_INFORMATION_NETWORK_DAYLIGHT_SAVING_TIME_PRESENT;
|
||||||
network_daylight_saving_time->length = 1;
|
network_daylight_saving_time->length = 1;
|
||||||
|
|
||||||
|
if(mme_self()->full_name.length)
|
||||||
|
{
|
||||||
|
emm_information->presencemask |=
|
||||||
|
NAS_EMM_INFORMATION_FULL_NAME_FOR_NETWORK_PRESENT;
|
||||||
|
memcpy(&emm_information->full_name_for_network,
|
||||||
|
&mme_self()->full_name, sizeof(nas_network_name_t));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(mme_self()->short_name.length)
|
||||||
|
{
|
||||||
|
emm_information->presencemask |=
|
||||||
|
NAS_EMM_INFORMATION_SHORT_NAME_FOR_NETWORK_PRESENT;
|
||||||
|
memcpy(&emm_information->short_name_for_network,
|
||||||
|
&mme_self()->short_name, sizeof(nas_network_name_t));
|
||||||
|
}
|
||||||
|
|
||||||
rv = nas_security_encode(&emmbuf, mme_ue, &message);
|
rv = nas_security_encode(&emmbuf, mme_ue, &message);
|
||||||
d_assert(rv == CORE_OK && emmbuf, return CORE_ERROR, "emm build error");
|
d_assert(rv == CORE_OK && emmbuf, return CORE_ERROR, "emm build error");
|
||||||
d_assert(nas_send_to_downlink_nas_transport(mme_ue, emmbuf) == CORE_OK,,);
|
d_assert(nas_send_to_downlink_nas_transport(mme_ue, emmbuf) == CORE_OK,,);
|
||||||
|
|||||||
@@ -1211,6 +1211,57 @@ status_t mme_context_parse_config()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(!strcmp(mme_key, "network_name"))
|
||||||
|
{
|
||||||
|
yaml_iter_t network_name_iter;
|
||||||
|
yaml_iter_recurse(&mme_iter, &network_name_iter);
|
||||||
|
|
||||||
|
while(yaml_iter_next(&network_name_iter))
|
||||||
|
{
|
||||||
|
const char *network_name_key =
|
||||||
|
yaml_iter_key(&network_name_iter);
|
||||||
|
d_assert(network_name_key,
|
||||||
|
return CORE_ERROR,);
|
||||||
|
if (!strcmp(network_name_key, "full"))
|
||||||
|
{
|
||||||
|
nas_network_name_t *network_full_name =
|
||||||
|
&self.full_name;
|
||||||
|
const char *c_network_name =
|
||||||
|
yaml_iter_value(&network_name_iter);
|
||||||
|
c_uint8_t size = strlen(c_network_name);
|
||||||
|
c_uint8_t i;
|
||||||
|
for(i = 0;i<size;i++)
|
||||||
|
{
|
||||||
|
/* Workaround to convert the ASCII to USC-2 */
|
||||||
|
network_full_name->name[i*2] = 0;
|
||||||
|
network_full_name->name[(i*2)+1] =
|
||||||
|
c_network_name[i];
|
||||||
|
|
||||||
|
}
|
||||||
|
network_full_name->length = size*2+1;
|
||||||
|
network_full_name->coding_scheme = 1;
|
||||||
|
}
|
||||||
|
else if (!strcmp(network_name_key, "short"))
|
||||||
|
{
|
||||||
|
nas_network_name_t *network_short_name =
|
||||||
|
&self.short_name;
|
||||||
|
const char *c_network_name =
|
||||||
|
yaml_iter_value(&network_name_iter);
|
||||||
|
c_uint8_t size = strlen(c_network_name);
|
||||||
|
c_uint8_t i;
|
||||||
|
for(i = 0;i<size;i++)
|
||||||
|
{
|
||||||
|
/* Workaround to convert the ASCII to USC-2 */
|
||||||
|
network_short_name->name[i*2] = 0;
|
||||||
|
network_short_name->name[(i*2)+1] =
|
||||||
|
c_network_name[i];
|
||||||
|
|
||||||
|
}
|
||||||
|
network_short_name->length = size*2+1;
|
||||||
|
network_short_name->coding_scheme = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
d_warn("unknown key `%s`", mme_key);
|
d_warn("unknown key `%s`", mme_key);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -132,6 +132,11 @@ typedef struct _mme_context_t {
|
|||||||
/* System */
|
/* System */
|
||||||
msgq_id queue_id; /* Queue for processing MME control plane */
|
msgq_id queue_id; /* Queue for processing MME control plane */
|
||||||
tm_service_t tm_service; /* Timer Service */
|
tm_service_t tm_service; /* Timer Service */
|
||||||
|
|
||||||
|
/* Network Name */
|
||||||
|
nas_network_name_t short_name; /* Network short name */
|
||||||
|
nas_network_name_t full_name; /* Network Full Name */
|
||||||
|
|
||||||
} mme_context_t;
|
} mme_context_t;
|
||||||
|
|
||||||
typedef struct _mme_enb_t {
|
typedef struct _mme_enb_t {
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ status_t s1ap_build_setup_rsp(pkbuf_t **pkbuf)
|
|||||||
|
|
||||||
|
|
||||||
status_t s1ap_build_setup_failure(
|
status_t s1ap_build_setup_failure(
|
||||||
pkbuf_t **pkbuf, S1ap_Cause_PR group, long cause)
|
pkbuf_t **pkbuf, S1ap_Cause_PR group, long cause, long time_to_wait)
|
||||||
{
|
{
|
||||||
int erval;
|
int erval;
|
||||||
|
|
||||||
@@ -97,6 +97,14 @@ status_t s1ap_build_setup_failure(
|
|||||||
ies = &message.s1ap_S1SetupFailureIEs;
|
ies = &message.s1ap_S1SetupFailureIEs;
|
||||||
ies->cause.present = group;
|
ies->cause.present = group;
|
||||||
ies->cause.choice.radioNetwork = cause;
|
ies->cause.choice.radioNetwork = cause;
|
||||||
|
d_trace(5, " Gruop[%d] Cause[%d] TimeToWait[%ld]\n",
|
||||||
|
group, cause, time_to_wait);
|
||||||
|
|
||||||
|
if (time_to_wait > -1)
|
||||||
|
{
|
||||||
|
ies->presenceMask |= S1AP_S1SETUPFAILUREIES_TIMETOWAIT_PRESENT;
|
||||||
|
ies->timeToWait = time_to_wait;
|
||||||
|
}
|
||||||
|
|
||||||
message.procedureCode = S1ap_ProcedureCode_id_S1Setup;
|
message.procedureCode = S1ap_ProcedureCode_id_S1Setup;
|
||||||
message.direction = S1AP_PDU_PR_unsuccessfulOutcome;
|
message.direction = S1AP_PDU_PR_unsuccessfulOutcome;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ extern "C" {
|
|||||||
|
|
||||||
CORE_DECLARE(status_t) s1ap_build_setup_rsp(pkbuf_t **pkbuf);
|
CORE_DECLARE(status_t) s1ap_build_setup_rsp(pkbuf_t **pkbuf);
|
||||||
CORE_DECLARE(status_t) s1ap_build_setup_failure(
|
CORE_DECLARE(status_t) s1ap_build_setup_failure(
|
||||||
pkbuf_t **pkbuf, S1ap_Cause_PR group, long cause);
|
pkbuf_t **pkbuf, S1ap_Cause_PR group, long cause, long time_to_wait);
|
||||||
CORE_DECLARE(status_t) s1ap_build_downlink_nas_transport(
|
CORE_DECLARE(status_t) s1ap_build_downlink_nas_transport(
|
||||||
pkbuf_t **s1apbuf, enb_ue_t *enb_ue, pkbuf_t *emmbuf);
|
pkbuf_t **s1apbuf, enb_ue_t *enb_ue, pkbuf_t *emmbuf);
|
||||||
CORE_DECLARE(status_t) s1ap_build_initial_context_setup_request(
|
CORE_DECLARE(status_t) s1ap_build_initial_context_setup_request(
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ void s1ap_handle_s1_setup_request(mme_enb_t *enb, s1ap_message_t *message)
|
|||||||
pkbuf_t *s1apbuf = NULL;
|
pkbuf_t *s1apbuf = NULL;
|
||||||
c_uint32_t enb_id;
|
c_uint32_t enb_id;
|
||||||
int i, j;
|
int i, j;
|
||||||
|
S1ap_Cause_PR group = S1ap_Cause_PR_NOTHING;
|
||||||
|
long cause = 0;
|
||||||
|
|
||||||
d_assert(enb, return, "Null param");
|
d_assert(enb, return, "Null param");
|
||||||
d_assert(enb->sock, return, "Null param");
|
d_assert(enb->sock, return, "Null param");
|
||||||
@@ -38,6 +40,8 @@ void s1ap_handle_s1_setup_request(mme_enb_t *enb, s1ap_message_t *message)
|
|||||||
s1ap_ENB_ID_to_uint32(&ies->global_ENB_ID.eNB_ID, &enb_id);
|
s1ap_ENB_ID_to_uint32(&ies->global_ENB_ID.eNB_ID, &enb_id);
|
||||||
d_trace(5, " IP[%s] ENB_ID[%d]\n", CORE_ADDR(enb->addr, buf), enb_id);
|
d_trace(5, " IP[%s] ENB_ID[%d]\n", CORE_ADDR(enb->addr, buf), enb_id);
|
||||||
|
|
||||||
|
mme_enb_set_enb_id(enb, enb_id);
|
||||||
|
|
||||||
/* Parse Supported TA */
|
/* Parse Supported TA */
|
||||||
enb->num_of_supported_ta_list = 0;
|
enb->num_of_supported_ta_list = 0;
|
||||||
for (i = 0; i < ies->supportedTAs.list.count; i++)
|
for (i = 0; i < ies->supportedTAs.list.count; i++)
|
||||||
@@ -59,38 +63,66 @@ void s1ap_handle_s1_setup_request(mme_enb_t *enb, s1ap_message_t *message)
|
|||||||
enb->supported_ta_list[enb->num_of_supported_ta_list].tac =
|
enb->supported_ta_list[enb->num_of_supported_ta_list].tac =
|
||||||
ntohs(enb->supported_ta_list
|
ntohs(enb->supported_ta_list
|
||||||
[enb->num_of_supported_ta_list].tac);
|
[enb->num_of_supported_ta_list].tac);
|
||||||
d_trace(5, " TAC[%d]\n",
|
|
||||||
enb->supported_ta_list[enb->num_of_supported_ta_list].tac);
|
|
||||||
|
|
||||||
memcpy(&enb->supported_ta_list
|
memcpy(&enb->supported_ta_list
|
||||||
[enb->num_of_supported_ta_list].plmn_id,
|
[enb->num_of_supported_ta_list].plmn_id,
|
||||||
pLMNidentity->buf, sizeof(plmn_id_t));
|
pLMNidentity->buf, sizeof(plmn_id_t));
|
||||||
d_trace(5, " PLMN_ID[MCC:%d MNC:%d]\n",
|
d_trace(5, " PLMN_ID[MCC:%d MNC:%d] TAC[%d]\n",
|
||||||
plmn_id_mcc(&enb->supported_ta_list
|
plmn_id_mcc(&enb->supported_ta_list
|
||||||
[enb->num_of_supported_ta_list].plmn_id),
|
[enb->num_of_supported_ta_list].plmn_id),
|
||||||
plmn_id_mnc(&enb->supported_ta_list
|
plmn_id_mnc(&enb->supported_ta_list
|
||||||
[enb->num_of_supported_ta_list].plmn_id));
|
[enb->num_of_supported_ta_list].plmn_id),
|
||||||
|
enb->supported_ta_list[enb->num_of_supported_ta_list].tac);
|
||||||
enb->num_of_supported_ta_list++;
|
enb->num_of_supported_ta_list++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (enb->num_of_supported_ta_list == 0)
|
if (enb->num_of_supported_ta_list == 0)
|
||||||
{
|
{
|
||||||
d_error("No supported TA exist in s1stup_req messages");
|
d_warn("S1-Setup failure:");
|
||||||
|
d_warn(" No supported TA exist in S1-Setup request");
|
||||||
|
group = S1ap_Cause_PR_misc;
|
||||||
|
cause = S1ap_CauseMisc_unspecified;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int served_tai_index = -1;
|
||||||
|
for (i = 0; i < enb->num_of_supported_ta_list; i++)
|
||||||
|
{
|
||||||
|
served_tai_index =
|
||||||
|
mme_find_served_tai(&enb->supported_ta_list[i]);
|
||||||
|
if (served_tai_index >= 0 &&
|
||||||
|
served_tai_index < MAX_NUM_OF_SERVED_TAI)
|
||||||
|
{
|
||||||
|
d_trace(5, " SERVED_TAI_INDEX[%d]\n", served_tai_index);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (served_tai_index < 0)
|
||||||
|
{
|
||||||
|
d_warn("S1-Setup failure:");
|
||||||
|
d_warn(" Cannot find Served TAI. Check 'mme.tai' configuration");
|
||||||
|
group = S1ap_Cause_PR_misc;
|
||||||
|
cause = S1ap_CauseMisc_unknown_PLMN;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
d_assert(enb->sock, return,);
|
if (group == S1ap_Cause_PR_NOTHING)
|
||||||
|
{
|
||||||
|
d_trace(3, "[MME] S1-Setup response\n");
|
||||||
|
d_assert(s1ap_build_setup_rsp(&s1apbuf) == CORE_OK,
|
||||||
|
return, "s1ap_build_setup_rsp() failed");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
d_trace(3, "[MME] S1-Setup failure\n");
|
||||||
|
d_assert(s1ap_build_setup_failure(
|
||||||
|
&s1apbuf, group, cause, S1ap_TimeToWait_v10s) == CORE_OK,
|
||||||
|
return, "s1ap_build_setup_failure() failed");
|
||||||
|
}
|
||||||
|
|
||||||
d_trace(3, "[MME] S1-Setup response\n");
|
d_assert(s1ap_send_to_enb(enb, s1apbuf) == CORE_OK,,
|
||||||
|
"s1ap_send_to_enb() failed");
|
||||||
d_assert(mme_enb_set_enb_id(enb, enb_id) == CORE_OK,
|
|
||||||
return, "hash add error");
|
|
||||||
|
|
||||||
d_assert(s1ap_build_setup_rsp(&s1apbuf) == CORE_OK,
|
|
||||||
return, "build error");
|
|
||||||
d_assert(s1ap_send_to_enb(enb, s1apbuf) == CORE_OK, , "send error");
|
|
||||||
|
|
||||||
d_assert(enb->sock, return,);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void s1ap_handle_initial_ue_message(mme_enb_t *enb, s1ap_message_t *message)
|
void s1ap_handle_initial_ue_message(mme_enb_t *enb, s1ap_message_t *message)
|
||||||
|
|||||||
@@ -29,6 +29,8 @@ mme:
|
|||||||
security:
|
security:
|
||||||
integrity_order : [ EIA1, EIA2, EIA0 ]
|
integrity_order : [ EIA1, EIA2, EIA0 ]
|
||||||
ciphering_order : [ EEA0, EEA1, EEA2 ]
|
ciphering_order : [ EEA0, EEA1, EEA2 ]
|
||||||
|
network_name:
|
||||||
|
full: NextEPC
|
||||||
|
|
||||||
sgw:
|
sgw:
|
||||||
gtpc:
|
gtpc:
|
||||||
|
|||||||
@@ -143,6 +143,16 @@ mme:
|
|||||||
integrity_order : [ EIA1, EIA2, EIA0 ]
|
integrity_order : [ EIA1, EIA2, EIA0 ]
|
||||||
ciphering_order : [ EEA0, EEA1, EEA2 ]
|
ciphering_order : [ EEA0, EEA1, EEA2 ]
|
||||||
|
|
||||||
|
#
|
||||||
|
# <Network Name>
|
||||||
|
# network_name:
|
||||||
|
# full: NextEPC
|
||||||
|
# short: Next
|
||||||
|
#
|
||||||
|
|
||||||
|
network_name:
|
||||||
|
full: NextEPC
|
||||||
|
|
||||||
hss:
|
hss:
|
||||||
freeDiameter: hss.conf
|
freeDiameter: hss.conf
|
||||||
|
|
||||||
|
|||||||
@@ -48,8 +48,8 @@ static void attach_test1(abts_case *tc, void *data)
|
|||||||
"0002010000000153 12172c5949640125 006b000518000c00 00004900203311c6"
|
"0002010000000153 12172c5949640125 006b000518000c00 00004900203311c6"
|
||||||
"03c6a6d67f695e5a c02bb75b381b693c 3893a6d932fd9182 3544e3e79b";
|
"03c6a6d67f695e5a c02bb75b381b693c 3893a6d932fd9182 3544e3e79b";
|
||||||
char *_emm_information =
|
char *_emm_information =
|
||||||
"000b402a00000300 000005c00100009d 000800020001001a 001413279fcc7266"
|
"000b403b00000300 000005c00100009d 000800020001001a 002524271f9b491e"
|
||||||
"0307614771304112 527563490100";
|
"030761430f10004e 0065007800740045 0050004347812072 11240563490100";
|
||||||
|
|
||||||
mongoc_collection_t *collection = NULL;
|
mongoc_collection_t *collection = NULL;
|
||||||
bson_t *doc = NULL;
|
bson_t *doc = NULL;
|
||||||
@@ -244,7 +244,7 @@ static void attach_test1(abts_case *tc, void *data)
|
|||||||
ABTS_INT_EQUAL(tc, CORE_OK, rv);
|
ABTS_INT_EQUAL(tc, CORE_OK, rv);
|
||||||
CORE_HEX(_emm_information, strlen(_emm_information), tmp);
|
CORE_HEX(_emm_information, strlen(_emm_information), tmp);
|
||||||
ABTS_TRUE(tc, memcmp(recvbuf->payload, tmp, 28) == 0);
|
ABTS_TRUE(tc, memcmp(recvbuf->payload, tmp, 28) == 0);
|
||||||
ABTS_TRUE(tc, memcmp(recvbuf->payload+43, tmp+43, 3) == 0);
|
ABTS_TRUE(tc, memcmp(recvbuf->payload+32, tmp+32, 20) == 0);
|
||||||
pkbuf_free(recvbuf);
|
pkbuf_free(recvbuf);
|
||||||
|
|
||||||
core_sleep(time_from_msec(300));
|
core_sleep(time_from_msec(300));
|
||||||
@@ -863,9 +863,8 @@ static void attach_test3(abts_case *tc, void *data)
|
|||||||
"403b000003000000 05c0020000c80008 00020002001a0025 2407520042200639"
|
"403b000003000000 05c0020000c80008 00020002001a0025 2407520042200639"
|
||||||
"1c0021554d444928 4a1a062e10e543cb 257f1f800021f4f9 2d522a5b87";
|
"1c0021554d444928 4a1a062e10e543cb 257f1f800021f4f9 2d522a5b87";
|
||||||
char *_security_mode_command =
|
char *_security_mode_command =
|
||||||
"000b"
|
"000b402400000300 000005c0020000c8 000800020002001a 000e0d37a3761a13"
|
||||||
"4027000003000000 05c0020000c80008 00020002001a0011 103744bcbbd20007"
|
"00075d010002f0f0";
|
||||||
"5d010005f0f00000 00";
|
|
||||||
|
|
||||||
char *_esm_information_request =
|
char *_esm_information_request =
|
||||||
"000b"
|
"000b"
|
||||||
@@ -882,9 +881,8 @@ static void attach_test3(abts_case *tc, void *data)
|
|||||||
"05ff9c6791b8503a 032c6effa7";
|
"05ff9c6791b8503a 032c6effa7";
|
||||||
|
|
||||||
char *_emm_information =
|
char *_emm_information =
|
||||||
"000b"
|
"000b403b00000300 000005c0020000c8 000800020002001a 002524276782702a"
|
||||||
"402a000003000000 05c0020000c80008 00020002001a0014 1327dc833e850307"
|
"030761430f10004e 0065007800740045 0050004347812072 11941563490100";
|
||||||
"6147717042911120 8a490100";
|
|
||||||
|
|
||||||
char *_ue_context_release_command =
|
char *_ue_context_release_command =
|
||||||
"0017"
|
"0017"
|
||||||
@@ -1070,7 +1068,7 @@ static void attach_test3(abts_case *tc, void *data)
|
|||||||
ABTS_INT_EQUAL(tc, CORE_OK, rv);
|
ABTS_INT_EQUAL(tc, CORE_OK, rv);
|
||||||
CORE_HEX(_emm_information, strlen(_emm_information), tmp);
|
CORE_HEX(_emm_information, strlen(_emm_information), tmp);
|
||||||
ABTS_TRUE(tc, memcmp(recvbuf->payload, tmp, 28) == 0);
|
ABTS_TRUE(tc, memcmp(recvbuf->payload, tmp, 28) == 0);
|
||||||
ABTS_TRUE(tc, memcmp(recvbuf->payload+43, tmp+43, 3) == 0);
|
ABTS_TRUE(tc, memcmp(recvbuf->payload+32, tmp+32, 20) == 0);
|
||||||
pkbuf_free(recvbuf);
|
pkbuf_free(recvbuf);
|
||||||
|
|
||||||
/* Retreive M-TMSI */
|
/* Retreive M-TMSI */
|
||||||
|
|||||||
2
webui/package-lock.json
generated
2
webui/package-lock.json
generated
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "nextepc",
|
"name": "nextepc",
|
||||||
"version": "0.3.4",
|
"version": "0.3.5",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "nextepc",
|
"name": "nextepc",
|
||||||
"version": "0.3.4",
|
"version": "0.3.5",
|
||||||
"description": "NextEPC",
|
"description": "NextEPC",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"repository": "https://github.com/acetcom/nextepc",
|
"repository": "https://github.com/acetcom/nextepc",
|
||||||
|
|||||||
Reference in New Issue
Block a user