Compare commits

...

9 Commits

Author SHA1 Message Date
Sukchan Lee
2d5f9d0d26 Release v0.3.8 2018-04-29 21:48:27 +09:00
Sukchan Lee
765eb2ada0 update it 2018-04-20 10:48:52 +02:00
Sukchan Lee
ee3c2d29bf Merge branch 'master' of https://github.com/acetcom/nextepc 2018-04-20 09:06:50 +02:00
Sukchan Lee
60aca81a1f fix the bug for handover command in case of no indirect tunnel 2018-04-20 09:06:17 +02:00
Sukchan Lee
e60a3d567d fix memory-leak when s1ap decode is failed 2018-04-18 22:21:58 +09:00
James Park
c968067829 -Initialize enb_ue_s1ap_id to invalid value
-Use mme_ue_s1apid if enb_ue_s1ap_id is not valid when encoding
ue_context_release_command
2018-04-17 14:35:15 -07:00
James Park
553804dd94 Fix bug: Paging message should be copied before sending 2018-04-17 11:46:20 -07:00
Sukchan Lee
38a252bbf0 Merge branch 'master' of https://github.com/acetcom/nextepc 2018-04-15 18:37:58 +09:00
Sukchan Lee
ae1660c436 add warning 2018-04-15 18:37:45 +09:00
9 changed files with 87 additions and 47 deletions

View File

@@ -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 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
AC_INIT([NextEPC], [0.3.7], [acetcom@gmail.com])
AC_INIT([NextEPC], [0.3.8], [acetcom@gmail.com])
AC_SUBST(LIBVERSION)
LIBVERSION=1:0:0

12
debian/changelog vendored
View File

@@ -1,3 +1,15 @@
nextepc (0.3.8~xenial) xenial; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Sun, 29 Apr 2018 21:47:25 +0900
nextepc (0.3.8~artful) artful; urgency=medium
* Bug Fixed
-- Sukchan Lee <acetcom@gmail.com> Sun, 29 Apr 2018 21:45:36 +0900
nextepc (0.3.7~artful) artful; urgency=medium
* Buf Fixed

View File

@@ -1761,6 +1761,7 @@ enb_ue_t* enb_ue_add(mme_enb_t *enb)
index_alloc(&enb_ue_pool, &enb_ue);
d_assert(enb_ue, return NULL, "Null param");
enb_ue->enb_ue_s1ap_id = INVALID_UE_S1AP_ID;
enb_ue->mme_ue_s1ap_id = NEXT_ID(self.mme_ue_s1ap_id, 1, 0xffffffff);
enb_ue->enb = enb;

View File

@@ -160,6 +160,7 @@ struct _enb_ue_t {
index_t index; /* An index of this node */
/* UE identity */
#define INVALID_UE_S1AP_ID 0xffffffff /* Initial value of enb_ue_s1ap_id */
c_uint32_t enb_ue_s1ap_id; /* eNB-UE-S1AP-ID received from eNB */
c_uint32_t mme_ue_s1ap_id; /* MME-UE-S1AP-ID received from MME */

View File

@@ -181,7 +181,9 @@ void mme_state_operational(fsm_t *s, event_t *e)
if (rv != CORE_OK)
{
d_print_hex(pkbuf->payload, pkbuf->len);
d_assert(0, pkbuf_free(pkbuf); break, "Can't decode S1AP_PDU");
d_assert(0,
s1ap_free_pdu(&message); pkbuf_free(pkbuf); break,
"Can't decode S1AP_PDU");
}
event_set_param1(e, (c_uintptr_t)enb->index);
@@ -413,6 +415,7 @@ void mme_state_operational(fsm_t *s, event_t *e)
ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED);
d_assert(rv == CORE_OK,,
"nas_send_attach_reject failed");
d_warn("EMM_CAUSE : IMSI Unknown in HSS");
enb_ue = mme_ue->enb_ue;
d_assert(enb_ue, break, "No ENB UE context");

View File

@@ -1029,18 +1029,21 @@ status_t s1ap_build_ue_context_release_command(
Cause = &ie->value.choice.Cause;
#if UE_S1AP_IDs_PRESENT_mME_UE_S1AP_ID
UE_S1AP_IDs->present = S1AP_UE_S1AP_IDs_PR_mME_UE_S1AP_ID;
UE_S1AP_IDs->choice.mME_UE_S1AP_ID = enb_ue->mme_ue_s1ap_id;
#else
UE_S1AP_IDs->present = S1AP_UE_S1AP_IDs_PR_uE_S1AP_ID_pair;
UE_S1AP_IDs->choice.uE_S1AP_ID_pair =
core_calloc(1, sizeof(S1AP_UE_S1AP_ID_pair_t));
UE_S1AP_IDs->choice.uE_S1AP_ID_pair->mME_UE_S1AP_ID =
enb_ue->mme_ue_s1ap_id;
UE_S1AP_IDs->choice.uE_S1AP_ID_pair->eNB_UE_S1AP_ID =
enb_ue->enb_ue_s1ap_id;
#endif
if (enb_ue->enb_ue_s1ap_id == INVALID_UE_S1AP_ID)
{
UE_S1AP_IDs->present = S1AP_UE_S1AP_IDs_PR_mME_UE_S1AP_ID;
UE_S1AP_IDs->choice.mME_UE_S1AP_ID = enb_ue->mme_ue_s1ap_id;
}
else
{
UE_S1AP_IDs->present = S1AP_UE_S1AP_IDs_PR_uE_S1AP_ID_pair;
UE_S1AP_IDs->choice.uE_S1AP_ID_pair =
core_calloc(1, sizeof(S1AP_UE_S1AP_ID_pair_t));
UE_S1AP_IDs->choice.uE_S1AP_ID_pair->mME_UE_S1AP_ID =
enb_ue->mme_ue_s1ap_id;
UE_S1AP_IDs->choice.uE_S1AP_ID_pair->eNB_UE_S1AP_ID =
enb_ue->enb_ue_s1ap_id;
}
Cause->present = group;
Cause->choice.radioNetwork = cause;
@@ -1459,6 +1462,7 @@ status_t s1ap_build_handover_command(pkbuf_t **s1apbuf, enb_ue_t *source_ue)
S1AP_SuccessfulOutcome__value_PR_HandoverCommand;
HandoverCommand = &successfulOutcome->value.choice.HandoverCommand;
d_assert(HandoverCommand, return CORE_ERROR,);
ie = core_calloc(1, sizeof(S1AP_HandoverCommandIEs_t));
ASN_SEQUENCE_ADD(&HandoverCommand->protocolIEs, ie);
@@ -1487,28 +1491,6 @@ status_t s1ap_build_handover_command(pkbuf_t **s1apbuf, enb_ue_t *source_ue)
HandoverType = &ie->value.choice.HandoverType;
ie = core_calloc(1, sizeof(S1AP_HandoverCommandIEs_t));
ASN_SEQUENCE_ADD(&HandoverCommand->protocolIEs, ie);
ie->id = S1AP_ProtocolIE_ID_id_E_RABSubjecttoDataForwardingList;
ie->criticality = S1AP_Criticality_ignore;
ie->value.present =
S1AP_HandoverCommandIEs__value_PR_E_RABSubjecttoDataForwardingList;
E_RABSubjecttoDataForwardingList =
&ie->value.choice.E_RABSubjecttoDataForwardingList;
ie = core_calloc(1, sizeof(S1AP_HandoverCommandIEs_t));
ASN_SEQUENCE_ADD(&HandoverCommand->protocolIEs, ie);
ie->id = S1AP_ProtocolIE_ID_id_Target_ToSource_TransparentContainer;
ie->criticality = S1AP_Criticality_reject;
ie->value.present =
S1AP_HandoverCommandIEs__value_PR_Target_ToSource_TransparentContainer;
Target_ToSource_TransparentContainer =
&ie->value.choice.Target_ToSource_TransparentContainer;
*MME_UE_S1AP_ID = source_ue->mme_ue_s1ap_id;
*ENB_UE_S1AP_ID = source_ue->enb_ue_s1ap_id;
*HandoverType = source_ue->handover_type;
@@ -1522,23 +1504,48 @@ status_t s1ap_build_handover_command(pkbuf_t **s1apbuf, enb_ue_t *source_ue)
bearer = mme_bearer_first(sess);
while(bearer)
{
S1AP_E_RABDataForwardingItemIEs_t *item = NULL;
S1AP_E_RABDataForwardingItem_t *e_rab = NULL;
item = core_calloc(
1, sizeof(S1AP_E_RABDataForwardingItemIEs_t));
ASN_SEQUENCE_ADD(&E_RABSubjecttoDataForwardingList->list, item);
if (MME_HAVE_SGW_DL_INDIRECT_TUNNEL(bearer) ||
MME_HAVE_SGW_UL_INDIRECT_TUNNEL(bearer))
{
S1AP_E_RABDataForwardingItemIEs_t *item = NULL;
item->id = S1AP_ProtocolIE_ID_id_E_RABDataForwardingItem;
item->criticality = S1AP_Criticality_ignore;
item->value.present = S1AP_E_RABDataForwardingItemIEs__value_PR_E_RABDataForwardingItem;
if (E_RABSubjecttoDataForwardingList == NULL)
{
ie = core_calloc(1, sizeof(S1AP_HandoverCommandIEs_t));
d_assert(ie, return CORE_ERROR,);
ASN_SEQUENCE_ADD(&HandoverCommand->protocolIEs, ie);
e_rab = &item->value.choice.E_RABDataForwardingItem;
ie->id = S1AP_ProtocolIE_ID_id_E_RABSubjecttoDataForwardingList;
ie->criticality = S1AP_Criticality_ignore;
ie->value.present =
S1AP_HandoverCommandIEs__value_PR_E_RABSubjecttoDataForwardingList;
e_rab->e_RAB_ID = bearer->ebi;
E_RABSubjecttoDataForwardingList =
&ie->value.choice.E_RABSubjecttoDataForwardingList;
}
d_assert(E_RABSubjecttoDataForwardingList, return CORE_ERROR,);
item = core_calloc(
1, sizeof(S1AP_E_RABDataForwardingItemIEs_t));
d_assert(item, return CORE_ERROR,);
ASN_SEQUENCE_ADD(&E_RABSubjecttoDataForwardingList->list, item);
item->id = S1AP_ProtocolIE_ID_id_E_RABDataForwardingItem;
item->criticality = S1AP_Criticality_ignore;
item->value.present =
S1AP_E_RABDataForwardingItemIEs__value_PR_E_RABDataForwardingItem;
e_rab = &item->value.choice.E_RABDataForwardingItem;
d_assert(e_rab, return CORE_ERROR,);
e_rab->e_RAB_ID = bearer->ebi;
}
if (MME_HAVE_SGW_DL_INDIRECT_TUNNEL(bearer))
{
d_assert(e_rab, return CORE_ERROR,);
e_rab->dL_transportLayerAddress =
(S1AP_TransportLayerAddress_t *)
core_calloc(1, sizeof(S1AP_TransportLayerAddress_t));
@@ -1555,6 +1562,7 @@ status_t s1ap_build_handover_command(pkbuf_t **s1apbuf, enb_ue_t *source_ue)
if (MME_HAVE_SGW_UL_INDIRECT_TUNNEL(bearer))
{
d_assert(e_rab, return CORE_ERROR,);
e_rab->uL_TransportLayerAddress =
(S1AP_TransportLayerAddress_t *)
core_calloc(1, sizeof(S1AP_TransportLayerAddress_t));
@@ -1574,6 +1582,17 @@ status_t s1ap_build_handover_command(pkbuf_t **s1apbuf, enb_ue_t *source_ue)
sess = mme_sess_next(sess);
}
ie = core_calloc(1, sizeof(S1AP_HandoverCommandIEs_t));
ASN_SEQUENCE_ADD(&HandoverCommand->protocolIEs, ie);
ie->id = S1AP_ProtocolIE_ID_id_Target_ToSource_TransparentContainer;
ie->criticality = S1AP_Criticality_reject;
ie->value.present =
S1AP_HandoverCommandIEs__value_PR_Target_ToSource_TransparentContainer;
Target_ToSource_TransparentContainer =
&ie->value.choice.Target_ToSource_TransparentContainer;
s1ap_buffer_to_OCTET_STRING(mme_ue->container.buf, mme_ue->container.size,
Target_ToSource_TransparentContainer);

View File

@@ -1066,7 +1066,11 @@ void s1ap_handle_paging(mme_ue_t *mme_ue)
&mme_ue->tai, sizeof(tai_t)))
{
if (mme_ue->last_paging_msg)
{
s1apbuf = mme_ue->last_paging_msg;
/* Save it for later use */
mme_ue->last_paging_msg = pkbuf_copy(s1apbuf);
}
else
{
/* Buidl S1Ap Paging message */

View File

@@ -1,6 +1,6 @@
{
"name": "nextepc",
"version": "0.3.7",
"version": "0.3.8",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@@ -1,6 +1,6 @@
{
"name": "nextepc",
"version": "0.3.7",
"version": "0.3.8",
"description": "NextEPC",
"main": "index.js",
"repository": "https://github.com/acetcom/nextepc",