etc: update debug message

This commit is contained in:
Sukchan Lee 2021-01-04 23:24:22 -05:00
parent a96d3ca0fa
commit c9cfc4cf6e
24 changed files with 231 additions and 157 deletions

View File

@ -305,6 +305,9 @@ static connection_t *connection_add(
#else
curl_easy_setopt(conn->easy, CURLOPT_EXPECT_100_TIMEOUT_MS, 0L);
#endif
ogs_debug("SENDING...[%d]", (int)request->http.content_length);
if (request->http.content_length)
ogs_debug("%s", request->http.content);
}
}
@ -439,9 +442,16 @@ static void check_multi_info(ogs_sbi_client_t *client)
/* remove https://localhost:8000 */
response->h.uri = ogs_strdup(url);
ogs_debug("[%d:%s] %s",
response->status, response->h.method, response->h.uri);
response->http.content = ogs_memdup(conn->memory, conn->size);
response->http.content_length = conn->size;
ogs_debug("RECEIVED[%d]", (int)response->http.content_length);
if (response->http.content_length && response->http.content)
ogs_debug("%s", response->http.content);
if (content_type)
ogs_sbi_header_set(response->http.headers,
OGS_SBI_CONTENT_TYPE, content_type);

View File

@ -524,8 +524,6 @@ int ogs_sbi_parse_header(ogs_sbi_message_t *message, ogs_sbi_header_t *header)
message->h.method = header->method;
message->h.uri = header->uri;
ogs_assert(message->h.uri);
ogs_debug("[%s] %s", message->h.method ? message->h.method : "Notify",
message->h.uri);
uri = ogs_strdup(header->uri);
ogs_assert(uri);

View File

@ -332,12 +332,17 @@ static void server_send_response(
add_header(&nva[i++], ogs_hash_this_key(hi), ogs_hash_this_val(hi));
}
ogs_debug("STATUS [%d]", response->status);
if (response->http.content && response->http.content_length) {
nghttp2_data_provider data_prd;
data_prd.source.ptr = response;
data_prd.read_callback = response_read_callback;
ogs_debug("SENDING...: %d", (int)response->http.content_length);
ogs_debug("%s", response->http.content);
rv = nghttp2_submit_response(sbi_sess->session,
stream->stream_id, nva, nvlen, &data_prd);
} else {
@ -749,6 +754,13 @@ static int on_frame_recv(nghttp2_session *session,
/* HEADERS or DATA frame with +END_STREAM flag */
if (frame->hd.flags & NGHTTP2_FLAG_END_STREAM) {
ogs_debug("[%s] %s", request->h.method, request->h.uri);
if (request->http.content_length && request->http.content) {
ogs_debug("RECEIVED: %d", (int)request->http.content_length);
ogs_debug("%s", request->http.content);
}
if (server->cb(request, stream) != OGS_OK) {
ogs_warn("server callback error");
ogs_sbi_server_send_error(stream,
@ -850,7 +862,6 @@ static int on_header(nghttp2_session *session, const nghttp2_frame *frame,
ogs_assert(request->h.uri == NULL);
request->h.uri = ogs_sbi_parse_uri(valuestr, "?", &saveptr);
ogs_assert(request->h.uri);
ogs_debug("path: %s", request->h.uri);
memset(params, 0, sizeof(params));
@ -878,7 +889,6 @@ static int on_header(nghttp2_session *session, const nghttp2_frame *frame,
ogs_assert(request->h.method == NULL);
request->h.method = ogs_strdup(valuestr);
ogs_debug("method: %s", request->h.method);
} else {
@ -936,10 +946,6 @@ static int on_data_chunk_recv(nghttp2_session *session, uint8_t flags,
memcpy(request->http.content + offset, data, len);
request->http.content[request->http.content_length] = '\0';
ogs_debug("RECEIVED");
ogs_debug("content-length: %d", (int)request->http.content_length);
ogs_debug("%s", request->http.content);
return 0;
}
@ -1114,10 +1120,6 @@ static int on_send_data(nghttp2_session *session, nghttp2_frame *frame,
ogs_assert(framehd);
ogs_assert(length);
ogs_debug("SENDING...");
ogs_debug("content-length: %d", (int)response->http.content_length);
ogs_debug("%s", response->http.content);
pkbuf = ogs_pkbuf_alloc(NULL, OGS_MAX_SDU_LEN);
ogs_assert(pkbuf);
ogs_pkbuf_put_data(pkbuf, framehd, 9);

View File

@ -1205,8 +1205,13 @@ void amf_ue_remove_all()
{
amf_ue_t *amf_ue = NULL, *next = NULL;;
ogs_list_for_each_safe(&self.amf_ue_list, next, amf_ue)
ogs_list_for_each_safe(&self.amf_ue_list, next, amf_ue) {
ran_ue_t *ran_ue = ran_ue_cycle(amf_ue->ran_ue);
if (ran_ue) ran_ue_remove(ran_ue);
amf_ue_remove(amf_ue);
}
}
void amf_ue_fsm_init(amf_ue_t *amf_ue)
@ -1319,7 +1324,7 @@ amf_ue_t *amf_ue_find_by_message(ogs_nas_5gs_message_t *message)
amf_ue->suci ? amf_ue->suci : "Unknown",
ogs_amf_id_hexdump(&nas_guti.amf_id), nas_guti.m_tmsi);
} else {
ogs_warn("Unknown UE by 5G-S_TMSI[AMF_ID:0x%x,M_TMSI:0x%x]",
ogs_info("Unknown UE by 5G-S_TMSI[AMF_ID:0x%x,M_TMSI:0x%x]",
ogs_amf_id_hexdump(&nas_guti.amf_id), nas_guti.m_tmsi);
}
break;

View File

@ -486,14 +486,14 @@ ogs_pkbuf_t *gmm_build_configuration_update_command(
ogs_gmtime(tv.tv_sec, &gmt);
ogs_localtime(tv.tv_sec, &local);
ogs_debug(" GMT Time[Y:M:D H:M:S GMT:DST] - "
"%d:%d:%d, %d:%d:%d, %d:%d",
gmt.tm_year, gmt.tm_mon, gmt.tm_mday,
ogs_info(" UTC [%04d-%02d-%02dT%02d:%02d:%02d] "
"Timezone[%d]/DST[%d]",
gmt.tm_year+1900, gmt.tm_mon+1, gmt.tm_mday,
gmt.tm_hour, gmt.tm_min, gmt.tm_sec,
(int)gmt.tm_gmtoff, gmt.tm_isdst);
ogs_debug(" LOCAL Time[Y:M:D H:M:S GMT:DST] - "
"%d:%d:%d, %d:%d:%d, %d:%d",
local.tm_year, local.tm_mon, local.tm_mday,
ogs_info(" LOCAL [%04d-%02d-%02dT%02d:%02d:%02d] "
"Timezone[%d]/DST[%d]",
local.tm_year+1900, local.tm_mon+1, local.tm_mday,
local.tm_hour, local.tm_min, local.tm_sec,
(int)local.tm_gmtoff, local.tm_isdst);

View File

@ -56,8 +56,6 @@ int gmm_handle_registration_request(amf_ue_t *amf_ue,
ue_security_capability = &registration_request->ue_security_capability;
ogs_assert(ue_security_capability);
ogs_debug("Registration request");
if (!mobile_identity->length || !mobile_identity->buffer) {
ogs_error("No Mobile Identity");
nas_5gs_send_registration_reject(amf_ue,
@ -71,7 +69,7 @@ int gmm_handle_registration_request(amf_ue_t *amf_ue,
switch (mobile_identity_header->type) {
case OGS_NAS_5GS_MOBILE_IDENTITY_SUCI:
amf_ue_set_suci(amf_ue, mobile_identity);
ogs_debug("[%s] SUCI", amf_ue->suci);
ogs_info("[%s] SUCI", amf_ue->suci);
break;
case OGS_NAS_5GS_MOBILE_IDENTITY_GUTI:
mobile_identity_guti =
@ -84,7 +82,7 @@ int gmm_handle_registration_request(amf_ue_t *amf_ue,
ogs_nas_5gs_mobile_identity_guti_to_nas_guti(
mobile_identity_guti, &nas_guti);
ogs_debug("[%s] 5G-S_GUTI[AMF_ID:0x%x,M_TMSI:0x%x]",
ogs_info("[%s] 5G-S_GUTI[AMF_ID:0x%x,M_TMSI:0x%x]",
AMF_UE_HAVE_SUCI(amf_ue) ? amf_ue->suci : "Unknown ID",
ogs_amf_id_hexdump(&nas_guti.amf_id), nas_guti.m_tmsi);
break;
@ -338,8 +336,6 @@ int gmm_handle_service_request(amf_ue_t *amf_ue,
ngksi = &service_request->ngksi;
ogs_assert(ngksi);
ogs_debug("Service request");
amf_ue->nas.message_type = OGS_NAS_5GS_SERVICE_REQUEST;
amf_ue->nas.tsc = ngksi->tsc;
amf_ue->nas.ksi = ngksi->value;
@ -391,7 +387,7 @@ int gmm_handle_service_request(amf_ue_t *amf_ue,
}
ogs_debug(" SERVED_TAI_INDEX[%d]", served_tai_index);
ogs_debug("[%s] 5G-S_GUTI[AMF_ID:0x%x,M_TMSI:0x%x]",
ogs_info("[%s] 5G-S_GUTI[AMF_ID:0x%x,M_TMSI:0x%x]",
AMF_UE_HAVE_SUCI(amf_ue) ? amf_ue->suci : "Unknown ID",
ogs_amf_id_hexdump(&amf_ue->guti.amf_id), amf_ue->guti.m_tmsi);
@ -515,8 +511,6 @@ int gmm_handle_deregistration_request(amf_ue_t *amf_ue,
de_registration_type = &deregistration_request->de_registration_type;
ogs_debug("[%s] Deregistration request", amf_ue->supi);
/* Set 5GS Attach Type */
memcpy(&amf_ue->nas.de_registration,
de_registration_type, sizeof(ogs_nas_de_registration_type_t));
@ -531,6 +525,8 @@ int gmm_handle_deregistration_request(amf_ue_t *amf_ue,
if (deregistration_request->de_registration_type.switch_off)
ogs_debug(" Switch-Off");
ogs_info("[%s] SUCI", amf_ue->suci);
amf_sbi_send_release_all_sessions(
amf_ue, AMF_RELEASE_SM_CONTEXT_NO_STATE);
@ -612,7 +608,7 @@ int gmm_handle_identity_response(amf_ue_t *amf_ue,
if (mobile_identity_header->type == OGS_NAS_5GS_MOBILE_IDENTITY_SUCI) {
amf_ue_set_suci(amf_ue, mobile_identity);
ogs_debug("[%s] SUCI", amf_ue->suci);
ogs_info("[%s] SUCI", amf_ue->suci);
} else {
ogs_error("Not supported Identity type[%d]",
mobile_identity_header->type);

View File

@ -126,6 +126,7 @@ static void common_register_state(ogs_fsm_t *s, amf_event_t *e)
switch (nas_message->gmm.h.message_type) {
case OGS_NAS_5GS_REGISTRATION_REQUEST:
ogs_info("Registration request");
rv = gmm_handle_registration_request(
amf_ue, &nas_message->gmm.registration_request);
if (rv != OGS_OK) {
@ -170,6 +171,8 @@ static void common_register_state(ogs_fsm_t *s, amf_event_t *e)
break;
case OGS_NAS_5GS_SERVICE_REQUEST:
ogs_info("Service request");
rv = gmm_handle_service_request(
amf_ue, &nas_message->gmm.service_request);
if (rv != OGS_OK) {
@ -179,7 +182,7 @@ static void common_register_state(ogs_fsm_t *s, amf_event_t *e)
}
if (!AMF_UE_HAVE_SUCI(amf_ue)) {
ogs_error("Service request : Unknown UE");
ogs_info("Service request : Unknown UE");
nas_5gs_send_service_reject(amf_ue,
OGS_5GMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK);
OGS_FSM_TRAN(s, gmm_state_exception);
@ -207,6 +210,7 @@ static void common_register_state(ogs_fsm_t *s, amf_event_t *e)
case OGS_NAS_5GS_IDENTITY_RESPONSE:
CLEAR_AMF_UE_TIMER(amf_ue->t3570);
ogs_info("Identity response");
rv = gmm_handle_identity_response(amf_ue,
&nas_message->gmm.identity_response);
if (rv != OGS_OK) {
@ -297,6 +301,8 @@ static void common_register_state(ogs_fsm_t *s, amf_event_t *e)
break;
case OGS_NAS_5GS_DEREGISTRATION_REQUEST:
ogs_info("[%s] Deregistration request", amf_ue->supi);
gmm_handle_deregistration_request(
amf_ue, &nas_message->gmm.deregistration_request_from_ue);
OGS_FSM_TRAN(s, &gmm_state_de_registered);
@ -510,6 +516,8 @@ void gmm_state_authentication(ogs_fsm_t *s, amf_event_t *e)
break;
case OGS_NAS_5GS_DEREGISTRATION_REQUEST:
ogs_warn("[%s] Deregistration request", amf_ue->supi);
gmm_handle_deregistration_request(
amf_ue, &nas_message->gmm.deregistration_request_from_ue);
OGS_FSM_TRAN(s, &gmm_state_de_registered);
@ -727,7 +735,7 @@ void gmm_state_security_mode(ogs_fsm_t *s, amf_event_t *e)
OGS_FSM_TRAN(s, &gmm_state_authentication);
break;
case OGS_NAS_5GS_SERVICE_REQUEST:
ogs_debug("[%s] Service request", amf_ue->supi);
ogs_info("[%s] Service request", amf_ue->supi);
nas_5gs_send_service_reject(amf_ue,
OGS_5GMM_CAUSE_SECURITY_MODE_REJECTED_UNSPECIFIED);
OGS_FSM_TRAN(s, &gmm_state_exception);
@ -749,6 +757,8 @@ void gmm_state_security_mode(ogs_fsm_t *s, amf_event_t *e)
break;
case OGS_NAS_5GS_DEREGISTRATION_REQUEST:
ogs_warn("[%s] Deregistration request", amf_ue->supi);
gmm_handle_deregistration_request(
amf_ue, &nas_message->gmm.deregistration_request_from_ue);
OGS_FSM_TRAN(s, &gmm_state_de_registered);
@ -947,7 +957,7 @@ void gmm_state_initial_context_setup(ogs_fsm_t *s, amf_event_t *e)
switch (nas_message->gmm.h.message_type) {
case OGS_NAS_5GS_REGISTRATION_COMPLETE:
ogs_debug("[%s] Registration complete", amf_ue->supi);
ogs_info("[%s] Registration complete", amf_ue->supi);
/*
* TS24.501
@ -1006,6 +1016,8 @@ void gmm_state_initial_context_setup(ogs_fsm_t *s, amf_event_t *e)
break;
case OGS_NAS_5GS_DEREGISTRATION_REQUEST:
ogs_warn("[%s] Deregistration request", amf_ue->supi);
gmm_handle_deregistration_request(
amf_ue, &nas_message->gmm.deregistration_request_from_ue);
OGS_FSM_TRAN(s, &gmm_state_de_registered);
@ -1081,6 +1093,7 @@ void gmm_state_exception(ogs_fsm_t *s, amf_event_t *e)
switch (nas_message->gmm.h.message_type) {
case OGS_NAS_5GS_REGISTRATION_REQUEST:
ogs_info("Registration request");
rv = gmm_handle_registration_request(
amf_ue, &nas_message->gmm.registration_request);
if (rv != OGS_OK) {

View File

@ -284,7 +284,7 @@ void nas_5gs_send_configuration_update_command(
ogs_assert(amf_ue);
ogs_debug("[%s] Configuration update command", amf_ue->supi);
ogs_info("[%s] Configuration update command", amf_ue->supi);
if (amf_ue->t3555.pkbuf) {
gmmbuf = amf_ue->t3555.pkbuf;

View File

@ -344,7 +344,7 @@ void ngap_handle_initial_ue_message(amf_gnb_t *gnb, ogs_ngap_message_t *message)
InitialUEMessage = &initiatingMessage->value.choice.InitialUEMessage;
ogs_assert(InitialUEMessage);
ogs_debug("Initial UE Message");
ogs_info("Initial UE Message");
for (i = 0; i < InitialUEMessage->protocolIEs.list.count; i++) {
ie = InitialUEMessage->protocolIEs.list.array[i];
@ -410,10 +410,10 @@ void ngap_handle_initial_ue_message(amf_gnb_t *gnb, ogs_ngap_message_t *message)
amf_ue = amf_ue_find_by_guti(&nas_guti);
if (!amf_ue) {
ogs_debug("Unknown UE by 5G-S_TMSI[AMF_ID:0x%x,M_TMSI:0x%x]",
ogs_info("Unknown UE by 5G-S_TMSI[AMF_ID:0x%x,M_TMSI:0x%x]",
ogs_amf_id_hexdump(&nas_guti.amf_id), nas_guti.m_tmsi);
} else {
ogs_debug("[%s] 5G-S_TMSI[AMF_ID:0x%x,M_TMSI:0x%x]",
ogs_info("[%s] 5G-S_TMSI[AMF_ID:0x%x,M_TMSI:0x%x]",
AMF_UE_HAVE_SUCI(amf_ue) ? amf_ue->suci : "Unknown ID",
ogs_amf_id_hexdump(&amf_ue->guti.amf_id),
amf_ue->guti.m_tmsi);
@ -473,7 +473,7 @@ void ngap_handle_initial_ue_message(amf_gnb_t *gnb, ogs_ngap_message_t *message)
return;
}
ogs_debug(" RAN_UE_NGAP_ID[%d] AMF_UE_NGAP_ID[%lld] "
ogs_info(" RAN_UE_NGAP_ID[%d] AMF_UE_NGAP_ID[%lld] "
"TAC[%d] CellID[0x%llx]",
ran_ue->ran_ue_ngap_id, (long long)ran_ue->amf_ue_ngap_id,
ran_ue->saved.tai.tac.v, (long long)ran_ue->saved.nr_cgi.cell_id);
@ -1171,6 +1171,11 @@ void ngap_handle_ue_context_release_action(ran_ue_t *ran_ue)
ogs_assert(ran_ue);
if (ran_ue_cycle(ran_ue) == NULL) {
ogs_error("NG context has already been removed");
return;
}
amf_ue = ran_ue->amf_ue;
ogs_info("UE Context Release [Action:%d]", ran_ue->ue_ctx_rel_action);
@ -1758,7 +1763,7 @@ void ngap_handle_path_switch_request(
PathSwitchRequest = &initiatingMessage->value.choice.PathSwitchRequest;
ogs_assert(PathSwitchRequest);
ogs_debug("Path switch request");
ogs_info("Path switch request");
for (i = 0; i < PathSwitchRequest->protocolIEs.list.count; i++) {
ie = PathSwitchRequest->protocolIEs.list.array[i];
@ -1824,9 +1829,9 @@ void ngap_handle_path_switch_request(
return;
}
ogs_debug(" [OLD] RAN_UE_NGAP_ID[%d] AMF_UE_NGAP_ID[%lld] ",
ogs_info(" [OLD] RAN_UE_NGAP_ID[%d] AMF_UE_NGAP_ID[%lld] ",
ran_ue->ran_ue_ngap_id, (long long)ran_ue->amf_ue_ngap_id);
ogs_debug(" [OLD] TAC[%d] CellID[0x%llx]",
ogs_info(" [OLD] TAC[%d] CellID[0x%llx]",
amf_ue->tai.tac.v, (long long)amf_ue->nr_cgi.cell_id);
/* Update RAN-UE-NGAP-ID */
@ -1851,7 +1856,7 @@ void ngap_handle_path_switch_request(
return;
}
ogs_debug(" [NEW] RAN_UE_NGAP_ID[%d] AMF_UE_NGAP_ID[%lld] ",
ogs_info(" [NEW] RAN_UE_NGAP_ID[%d] AMF_UE_NGAP_ID[%lld] ",
ran_ue->ran_ue_ngap_id, (long long)ran_ue->amf_ue_ngap_id);
UserLocationInformationNR =
@ -1866,7 +1871,7 @@ void ngap_handle_path_switch_request(
memcpy(&amf_ue->tai, &ran_ue->saved.tai, sizeof(ogs_5gs_tai_t));
memcpy(&amf_ue->nr_cgi, &ran_ue->saved.nr_cgi, sizeof(ogs_nr_cgi_t));
ogs_debug(" [NEW] TAC[%d] CellID[0x%llx]",
ogs_info(" [NEW] TAC[%d] CellID[0x%llx]",
amf_ue->tai.tac.v, (long long)amf_ue->nr_cgi.cell_id);
if (!UESecurityCapabilities) {

View File

@ -179,25 +179,10 @@ void ngap_recv_handler(ogs_sock_t *sock)
}
break;
case SCTP_SHUTDOWN_EVENT :
case SCTP_SEND_FAILED :
if (not->sn_header.sn_type == SCTP_SHUTDOWN_EVENT)
ogs_debug("SCTP_SHUTDOWN_EVENT:[T:%d, F:0x%x, L:%d]",
not->sn_shutdown_event.sse_type,
not->sn_shutdown_event.sse_flags,
not->sn_shutdown_event.sse_length);
if (not->sn_header.sn_type == SCTP_SEND_FAILED)
#if HAVE_USRSCTP
ogs_error("SCTP_SEND_FAILED:[T:%d, F:0x%x, S:%d]",
not->sn_send_failed_event.ssfe_type,
not->sn_send_failed_event.ssfe_flags,
not->sn_send_failed_event.ssfe_error);
#else
ogs_error("SCTP_SEND_FAILED:[T:%d, F:0x%x, S:%d]",
not->sn_send_failed.ssf_type,
not->sn_send_failed.ssf_flags,
not->sn_send_failed.ssf_error);
#endif
ogs_debug("SCTP_SHUTDOWN_EVENT:[T:%d, F:0x%x, L:%d]",
not->sn_shutdown_event.sse_type,
not->sn_shutdown_event.sse_flags,
not->sn_shutdown_event.sse_length);
addr = ogs_calloc(1, sizeof(ogs_sockaddr_t));
ogs_assert(addr);
memcpy(addr, &from, sizeof(ogs_sockaddr_t));
@ -205,6 +190,21 @@ void ngap_recv_handler(ogs_sock_t *sock)
ngap_event_push(AMF_EVT_NGAP_LO_CONNREFUSED,
sock, addr, NULL, 0, 0);
break;
case SCTP_SEND_FAILED :
#if HAVE_USRSCTP
ogs_error("SCTP_SEND_FAILED:[T:%d, F:0x%x, S:%d]",
not->sn_send_failed_event.ssfe_type,
not->sn_send_failed_event.ssfe_flags,
not->sn_send_failed_event.ssfe_error);
#else
ogs_error("SCTP_SEND_FAILED:[T:%d, F:0x%x, S:%d]",
not->sn_send_failed.ssf_type,
not->sn_send_failed.ssf_flags,
not->sn_send_failed.ssf_error);
#endif
break;
case SCTP_PEER_ADDR_CHANGE:
ogs_warn("SCTP_PEER_ADDR_CHANGE:[T:%d, F:0x%x, S:%d]",
not->sn_paddr_change.spc_type,

View File

@ -221,18 +221,31 @@ void amf_sbi_send_deactivate_all_ue_in_gnb(amf_gnb_t *gnb, int state)
int old_xact_count = 0, new_xact_count = 0;
amf_ue = ran_ue->amf_ue;
ogs_assert(amf_ue);
old_xact_count = amf_sess_xact_count(amf_ue);
if (amf_ue) {
old_xact_count = amf_sess_xact_count(amf_ue);
amf_sbi_send_deactivate_all_sessions(
amf_sbi_send_deactivate_all_sessions(
amf_ue, state, NGAP_Cause_PR_radioNetwork,
NGAP_CauseRadioNetwork_failure_in_radio_interface_procedure);
new_xact_count = amf_sess_xact_count(amf_ue);
new_xact_count = amf_sess_xact_count(amf_ue);
if (old_xact_count == new_xact_count) {
ran_ue_remove(ran_ue);
if (old_xact_count == new_xact_count) {
ran_ue_remove(ran_ue);
}
} else {
ogs_warn("amf_sbi_send_deactivate_all_ue_in_gnb()");
ogs_warn(" RAN_UE_NGAP_ID[%d] AMF_UE_NGAP_ID[%lld] State[%d]",
ran_ue->ran_ue_ngap_id, (long long)ran_ue->amf_ue_ngap_id,
state);
if (state == AMF_UPDATE_SM_CONTEXT_NG_RESET) {
ran_ue_remove(ran_ue);
} else {
/* At this point, it does not support other action */
ogs_assert_if_reached();
}
}
}
}

View File

@ -168,7 +168,7 @@ int emm_handle_attach_request(mme_ue_t *mme_ue,
imsi_bcd);
mme_ue_set_imsi(mme_ue, imsi_bcd);
ogs_debug(" IMSI[%s]", imsi_bcd);
ogs_info(" IMSI[%s]", imsi_bcd);
break;
case OGS_NAS_EPS_MOBILE_IDENTITY_GUTI:
@ -179,7 +179,7 @@ int emm_handle_attach_request(mme_ue_t *mme_ue,
nas_guti.mme_code = eps_mobile_identity_guti->mme_code;
nas_guti.m_tmsi = eps_mobile_identity_guti->m_tmsi;
ogs_debug(" GUTI[G:%d,C:%d,M_TMSI:0x%x] IMSI[%s]",
ogs_info(" GUTI[G:%d,C:%d,M_TMSI:0x%x] IMSI[%s]",
nas_guti.mme_gid,
nas_guti.mme_code,
nas_guti.m_tmsi,
@ -220,12 +220,13 @@ int emm_handle_attach_complete(
ogs_assert(mme_ue);
ogs_debug(" GMT Time[Y:M:D H:M:S GMT:DST] - %d:%d:%d, %d:%d:%d, %d:%d",
gmt.tm_year, gmt.tm_mon, gmt.tm_mday,
ogs_info(" IMSI[%s]", mme_ue->imsi_bcd);
ogs_info(" UTC [%04d-%02d-%02dT%02d:%02d:%02d] Timezone[%d]/DST[%d]",
gmt.tm_year+1900, gmt.tm_mon+1, gmt.tm_mday,
gmt.tm_hour, gmt.tm_min, gmt.tm_sec,
(int)gmt.tm_gmtoff, gmt.tm_isdst);
ogs_debug(" LOCAL Time[Y:M:D H:M:S GMT:DST] - %d:%d:%d, %d:%d:%d, %d:%d",
local.tm_year, local.tm_mon, local.tm_mday,
ogs_info(" LOCAL [%04d-%02d-%02dT%02d:%02d:%02d] Timezone[%d]/DST[%d]",
local.tm_year+1900, local.tm_mon+1, local.tm_mday,
local.tm_hour, local.tm_min, local.tm_sec,
(int)local.tm_gmtoff, local.tm_isdst);
@ -332,6 +333,8 @@ int emm_handle_identity_response(
ogs_error("Invalid IMSI LEN[%d]", mme_ue->imsi_len);
return OGS_ERROR;
}
ogs_info(" IMSI[%s]", mme_ue->imsi_bcd);
} else {
ogs_warn("Not supported Identity type[%d]", mobile_identity->imsi.type);
}
@ -379,6 +382,8 @@ int emm_handle_detach_request(
if (detach_request->detach_type.switch_off)
ogs_debug(" Switch-Off");
ogs_info(" IMSI[%s]", mme_ue->imsi_bcd);
return OGS_OK;
}
@ -411,7 +416,7 @@ int emm_handle_service_request(
mme_ue->nhcc = 1;
}
ogs_debug(" GUTI[G:%d,C:%d,M_TMSI:0x%x] IMSI[%s]",
ogs_info(" GUTI[G:%d,C:%d,M_TMSI:0x%x] IMSI[%s]",
mme_ue->guti.mme_gid,
mme_ue->guti.mme_code,
mme_ue->guti.m_tmsi,
@ -534,7 +539,7 @@ int emm_handle_tau_request(mme_ue_t *mme_ue,
nas_guti.mme_code = eps_mobile_identity_guti->mme_code;
nas_guti.m_tmsi = eps_mobile_identity_guti->m_tmsi;
ogs_debug(" GUTI[G:%d,C:%d,M_TMSI:0x%x] IMSI:[%s]",
ogs_info(" GUTI[G:%d,C:%d,M_TMSI:0x%x] IMSI:[%s]",
nas_guti.mme_gid,
nas_guti.mme_code,
nas_guti.m_tmsi,
@ -615,7 +620,7 @@ int emm_handle_extended_service_request(mme_ue_t *mme_ue,
case OGS_NAS_MOBILE_IDENTITY_TMSI:
mobile_identity_tmsi = &mobile_identity->tmsi;
ogs_debug(" M-TMSI:[0x%x] IMSI:[%s]",
ogs_info(" M-TMSI:[0x%x] IMSI:[%s]",
mobile_identity_tmsi->tmsi,
MME_UE_HAVE_IMSI(mme_ue) ? mme_ue->imsi_bcd : "Unknown");
break;

View File

@ -120,7 +120,7 @@ static void common_register_state(ogs_fsm_t *s, mme_event_t *e)
if (message->emm.h.security_header_type
== OGS_NAS_SECURITY_HEADER_FOR_SERVICE_REQUEST_MESSAGE) {
ogs_debug("Service request");
ogs_info("Service request");
rv = emm_handle_service_request(
mme_ue, &message->emm.service_request);
if (rv != OGS_OK) {
@ -168,7 +168,7 @@ static void common_register_state(ogs_fsm_t *s, mme_event_t *e)
switch (message->emm.h.message_type) {
case OGS_NAS_EPS_IDENTITY_RESPONSE:
ogs_debug("Identity response");
ogs_info("Identity response");
CLEAR_MME_UE_TIMER(mme_ue->t3470);
rv = emm_handle_identity_response(mme_ue,
@ -185,8 +185,6 @@ static void common_register_state(ogs_fsm_t *s, mme_event_t *e)
break;
}
ogs_debug(" IMSI[%s]", mme_ue->imsi_bcd);
if (SESSION_CONTEXT_IS_AVAILABLE(mme_ue)) {
mme_gtp_send_delete_all_sessions(mme_ue,
OGS_GTP_DELETE_SEND_AUTHENTICATION_REQUEST);
@ -197,7 +195,7 @@ static void common_register_state(ogs_fsm_t *s, mme_event_t *e)
break;
case OGS_NAS_EPS_ATTACH_REQUEST:
ogs_debug("Attach request[%s]", mme_ue->imsi_bcd);
ogs_info("Attach request");
rv = emm_handle_attach_request(
mme_ue, &message->emm.attach_request, e->pkbuf);
if (rv != OGS_OK) {
@ -241,7 +239,7 @@ static void common_register_state(ogs_fsm_t *s, mme_event_t *e)
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_REQUEST:
ogs_debug("Tracking area update request");
ogs_info("Tracking area update request");
rv = emm_handle_tau_request(mme_ue,
&message->emm.tracking_area_update_request, e->pkbuf);
if (rv != OGS_OK) {
@ -304,12 +302,12 @@ static void common_register_state(ogs_fsm_t *s, mme_event_t *e)
break;
case OGS_NAS_EPS_TRACKING_AREA_UPDATE_COMPLETE:
ogs_debug("Tracking area update complete");
ogs_debug(" IMSI[%s]", mme_ue->imsi_bcd);
ogs_info("Tracking area update complete");
ogs_info(" IMSI[%s]", mme_ue->imsi_bcd);
break;
case OGS_NAS_EPS_EXTENDED_SERVICE_REQUEST:
ogs_debug("Extended service request");
ogs_info("Extended service request");
rv = emm_handle_extended_service_request(
mme_ue, &message->emm.extended_service_request);
if (rv != OGS_OK) {
@ -424,8 +422,7 @@ static void common_register_state(ogs_fsm_t *s, mme_event_t *e)
break;
case OGS_NAS_EPS_DETACH_REQUEST:
ogs_debug("Detach request");
ogs_debug(" IMSI[%s]", mme_ue->imsi_bcd);
ogs_info("Detach request");
rv = emm_handle_detach_request(
mme_ue, &message->emm.detach_request_from_ue);
if (rv != OGS_OK) {
@ -646,8 +643,7 @@ void emm_state_authentication(ogs_fsm_t *s, mme_event_t *e)
OGS_FSM_TRAN(s, &emm_state_exception);
break;
case OGS_NAS_EPS_DETACH_REQUEST:
ogs_debug("Detach request");
ogs_debug(" IMSI[%s]", mme_ue->imsi_bcd);
ogs_warn("Detach request");
rv = emm_handle_detach_request(
mme_ue, &message->emm.detach_request_from_ue);
if (rv != OGS_OK) {
@ -810,8 +806,7 @@ void emm_state_security_mode(ogs_fsm_t *s, mme_event_t *e)
OGS_FSM_TRAN(s, &emm_state_exception);
break;
case OGS_NAS_EPS_DETACH_REQUEST:
ogs_debug("Detach request");
ogs_debug(" IMSI[%s]", mme_ue->imsi_bcd);
ogs_warn("Detach request");
rv = emm_handle_detach_request(
mme_ue, &message->emm.detach_request_from_ue);
if (rv != OGS_OK) {
@ -884,8 +879,7 @@ void emm_state_initial_context_setup(ogs_fsm_t *s, mme_event_t *e)
switch (message->emm.h.message_type) {
case OGS_NAS_EPS_ATTACH_COMPLETE:
ogs_debug("Attach complete");
ogs_debug(" IMSI[%s]", mme_ue->imsi_bcd);
ogs_info("Attach complete");
h.type = e->nas_type;
if (h.integrity_protected == 0) {
@ -941,8 +935,7 @@ void emm_state_initial_context_setup(ogs_fsm_t *s, mme_event_t *e)
OGS_FSM_TRAN(s, &emm_state_exception);
break;
case OGS_NAS_EPS_DETACH_REQUEST:
ogs_debug("Detach request");
ogs_debug(" IMSI[%s]", mme_ue->imsi_bcd);
ogs_warn("Detach request");
rv = emm_handle_detach_request(
mme_ue, &message->emm.detach_request_from_ue);
if (rv != OGS_OK) {
@ -1012,7 +1005,7 @@ void emm_state_exception(ogs_fsm_t *s, mme_event_t *e)
switch (message->emm.h.message_type) {
case OGS_NAS_EPS_ATTACH_REQUEST:
ogs_debug("Attach request[%s]", mme_ue->imsi_bcd);
ogs_info("Attach request[%s]", mme_ue->imsi_bcd);
rv = emm_handle_attach_request(
mme_ue, &message->emm.attach_request, e->pkbuf);
if (rv != OGS_OK) {

View File

@ -66,6 +66,7 @@ int esm_handle_pdn_connectivity_request(mme_bearer_t *bearer,
/* Invalid APN */
nas_eps_send_pdn_connectivity_reject(
sess, ESM_CAUSE_MISSING_OR_UNKNOWN_APN);
ogs_warn("Invalid APN");
return OGS_ERROR;
}
}
@ -113,6 +114,7 @@ int esm_handle_pdn_connectivity_request(mme_bearer_t *bearer,
mme_gtp_send_create_session_request(sess);
} else {
ogs_error("No APN");
nas_eps_send_pdn_connectivity_reject(
sess, ESM_CAUSE_MISSING_OR_UNKNOWN_APN);
return OGS_ERROR;
@ -162,6 +164,7 @@ int esm_handle_information_response(mme_sess_t *sess,
mme_gtp_send_create_session_request(sess);
}
} else {
ogs_error("No APN");
nas_eps_send_pdn_connectivity_reject(
sess, ESM_CAUSE_MISSING_OR_UNKNOWN_APN);
return OGS_ERROR;

View File

@ -2289,8 +2289,13 @@ void mme_ue_remove_all(void)
{
mme_ue_t *mme_ue = NULL, *next = NULL;;
ogs_list_for_each_safe(&self.mme_ue_list, next, mme_ue)
ogs_list_for_each_safe(&self.mme_ue_list, next, mme_ue) {
enb_ue_t *enb_ue = enb_ue_cycle(mme_ue->enb_ue);
if (enb_ue) enb_ue_remove(enb_ue);
mme_ue_remove(mme_ue);
}
}
void mme_ue_fsm_init(mme_ue_t *mme_ue)

View File

@ -436,9 +436,23 @@ void mme_gtp_send_release_all_ue_in_enb(mme_enb_t *enb, int action)
ogs_list_for_each(&enb->enb_ue_list, enb_ue) {
mme_ue = enb_ue->mme_ue;
ogs_assert(mme_ue);
mme_gtp_send_release_access_bearers_request(mme_ue, action);
if (mme_ue) {
mme_gtp_send_release_access_bearers_request(mme_ue, action);
} else {
ogs_warn("mme_gtp_send_release_all_ue_in_enb()");
ogs_warn(" ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d] Action[%d]",
enb_ue->enb_ue_s1ap_id, enb_ue->mme_ue_s1ap_id, action);
if (action == OGS_GTP_RELEASE_S1_CONTEXT_REMOVE) {
enb_ue_remove(enb_ue);
} else {
/* At this point, it does not support other action */
ogs_assert_if_reached();
}
}
}
}

View File

@ -783,7 +783,7 @@ void mme_s11_handle_downlink_data_notification(
}
if (!mme_ue) {
ogs_error("No Context");
ogs_error("No UE Context");
cause_value = OGS_GTP_CAUSE_CONTEXT_NOT_FOUND;
}
@ -795,7 +795,7 @@ void mme_s11_handle_downlink_data_notification(
}
if (!bearer) {
ogs_error("No context");
ogs_error("No Bearer Context");
cause_value = OGS_GTP_CAUSE_CONTEXT_NOT_FOUND;
}

View File

@ -613,6 +613,8 @@ void mme_state_operational(ogs_fsm_t *s, mme_event_t *e)
ogs_warn("No Context : TEID[%d]", gtp_message.h.teid);
else
ogs_warn("No Context : No TEID");
break;
}
mme_s11_handle_downlink_data_notification(
xact, mme_ue, &gtp_message.downlink_data_notification);

View File

@ -90,7 +90,7 @@ void s1ap_handle_s1_setup_request(mme_enb_t *enb, ogs_s1ap_message_t *message)
S1SetupRequest = &initiatingMessage->value.choice.S1SetupRequest;
ogs_assert(S1SetupRequest);
ogs_debug("[MME] S1-Setup request");
ogs_debug("S1-Setup request");
for (i = 0; i < S1SetupRequest->protocolIEs.list.count; i++) {
ie = S1SetupRequest->protocolIEs.list.array[i];
@ -220,7 +220,7 @@ void s1ap_handle_initial_ue_message(mme_enb_t *enb, ogs_s1ap_message_t *message)
InitialUEMessage = &initiatingMessage->value.choice.InitialUEMessage;
ogs_assert(InitialUEMessage);
ogs_debug("[MME] Initial UE Message");
ogs_info("Initial UE Message");
for (i = 0; i < InitialUEMessage->protocolIEs.list.count; i++) {
ie = InitialUEMessage->protocolIEs.list.array[i];
@ -284,7 +284,7 @@ void s1ap_handle_initial_ue_message(mme_enb_t *enb, ogs_s1ap_message_t *message)
ogs_info("Unknown UE by S_TMSI[G:%d,C:%d,M_TMSI:0x%x]",
nas_guti.mme_gid, nas_guti.mme_code, nas_guti.m_tmsi);
} else {
ogs_debug(" S_TMSI[G:%d,C:%d,M_TMSI:0x%x] IMSI:[%s]",
ogs_info(" S_TMSI[G:%d,C:%d,M_TMSI:0x%x] IMSI:[%s]",
mme_ue->guti.mme_gid,
mme_ue->guti.mme_code,
mme_ue->guti.m_tmsi,
@ -337,7 +337,7 @@ void s1ap_handle_initial_ue_message(mme_enb_t *enb, ogs_s1ap_message_t *message)
sizeof(enb_ue->saved.e_cgi.cell_id));
enb_ue->saved.e_cgi.cell_id = (be32toh(enb_ue->saved.e_cgi.cell_id) >> 4);
ogs_debug(" ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d] TAC[%d]",
ogs_info(" ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d] TAC[%d]",
enb_ue->enb_ue_s1ap_id, enb_ue->mme_ue_s1ap_id, enb_ue->saved.tai.tac);
s1ap_send_to_nas(enb_ue,
@ -368,7 +368,7 @@ void s1ap_handle_uplink_nas_transport(
UplinkNASTransport = &initiatingMessage->value.choice.UplinkNASTransport;
ogs_assert(UplinkNASTransport);
ogs_debug("[MME] Uplink NAS transport");
ogs_debug("Uplink NAS transport");
for (i = 0; i < UplinkNASTransport->protocolIEs.list.count; i++) {
ie = UplinkNASTransport->protocolIEs.list.array[i];
@ -437,7 +437,7 @@ void s1ap_handle_ue_capability_info_indication(
&initiatingMessage->value.choice.UECapabilityInfoIndication;
ogs_assert(UECapabilityInfoIndication);
ogs_debug("[MME] UE capability info indication");
ogs_debug("UE capability info indication");
for (i = 0; i < UECapabilityInfoIndication->protocolIEs.list.count; i++) {
ie = UECapabilityInfoIndication->protocolIEs.list.array[i];
@ -497,7 +497,7 @@ void s1ap_handle_initial_context_setup_response(
&successfulOutcome->value.choice.InitialContextSetupResponse;
ogs_assert(InitialContextSetupResponse);
ogs_debug("[MME] Initial context setup response");
ogs_debug("Initial context setup response");
for (i = 0; i < InitialContextSetupResponse->protocolIEs.list.count; i++) {
ie = InitialContextSetupResponse->protocolIEs.list.array[i];
@ -635,7 +635,7 @@ void s1ap_handle_initial_context_setup_failure(
&unsuccessfulOutcome->value.choice.InitialContextSetupFailure;
ogs_assert(InitialContextSetupFailure);
ogs_debug("[MME] Initial context setup failure");
ogs_debug("Initial context setup failure");
for (i = 0; i < InitialContextSetupFailure->protocolIEs.list.count; i++) {
ie = InitialContextSetupFailure->protocolIEs.list.array[i];
@ -723,7 +723,7 @@ void s1ap_handle_ue_context_modification_response(
&successfulOutcome->value.choice.UEContextModificationResponse;
ogs_assert(UEContextModificationResponse);
ogs_debug("[MME] UE context modification response");
ogs_debug("UE context modification response");
for (i = 0; i < UEContextModificationResponse->protocolIEs.list.count; i++) {
ie = UEContextModificationResponse->protocolIEs.list.array[i];
@ -792,7 +792,7 @@ void s1ap_handle_ue_context_modification_failure(
&unsuccessfulOutcome->value.choice.UEContextModificationFailure;
ogs_assert(UEContextModificationFailure);
ogs_warn("[MME] UE context modification failure");
ogs_warn("UE context modification failure");
for (i = 0; i < UEContextModificationFailure->protocolIEs.list.count; i++) {
ie = UEContextModificationFailure->protocolIEs.list.array[i];
@ -869,7 +869,7 @@ void s1ap_handle_e_rab_setup_response(
E_RABSetupResponse = &successfulOutcome->value.choice.E_RABSetupResponse;
ogs_assert(E_RABSetupResponse);
ogs_debug("[MME] E-RAB setup response");
ogs_debug("E-RAB setup response");
for (i = 0; i < E_RABSetupResponse->protocolIEs.list.count; i++) {
ie = E_RABSetupResponse->protocolIEs.list.array[i];
@ -997,7 +997,7 @@ void s1ap_handle_ue_context_release_request(
&initiatingMessage->value.choice.UEContextReleaseRequest;
ogs_assert(UEContextReleaseRequest);
ogs_debug("[MME] UE Context release request");
ogs_debug("UE Context release request");
for (i = 0; i < UEContextReleaseRequest->protocolIEs.list.count; i++) {
ie = UEContextReleaseRequest->protocolIEs.list.array[i];
@ -1085,7 +1085,7 @@ void s1ap_handle_ue_context_release_complete(
&successfulOutcome->value.choice.UEContextReleaseComplete;
ogs_assert(UEContextReleaseComplete);
ogs_debug("[MME] UE Context release complete");
ogs_debug("UE Context release complete");
for (i = 0; i < UEContextReleaseComplete->protocolIEs.list.count; i++) {
ie = UEContextReleaseComplete->protocolIEs.list.array[i];
@ -1128,6 +1128,11 @@ void s1ap_handle_ue_context_release_action(enb_ue_t *enb_ue)
ogs_assert(enb_ue);
if (enb_ue_cycle(enb_ue) == NULL) {
ogs_error("S1 context has already been removed");
return;
}
mme_ue = enb_ue->mme_ue;
ogs_info("UE Context Release [Action:%d]", enb_ue->ue_ctx_rel_action);
@ -1223,7 +1228,7 @@ void s1ap_handle_path_switch_request(
PathSwitchRequest = &initiatingMessage->value.choice.PathSwitchRequest;
ogs_assert(PathSwitchRequest);
ogs_debug("[MME] Path switch request");
ogs_info("Path switch request");
for (i = 0; i < PathSwitchRequest->protocolIEs.list.count; i++) {
ie = PathSwitchRequest->protocolIEs.list.array[i];
@ -1274,16 +1279,16 @@ void s1ap_handle_path_switch_request(
return;
}
ogs_debug(" ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]",
ogs_info(" OLD ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]",
enb_ue->enb_ue_s1ap_id, enb_ue->mme_ue_s1ap_id);
mme_ue = enb_ue->mme_ue;
ogs_expect_or_return(mme_ue);
ogs_debug(" OLD TAI[PLMN_ID:%06x,TAC:%d]",
ogs_info(" OLD TAI[PLMN_ID:%06x,TAC:%d]",
ogs_plmn_id_hexdump(&mme_ue->tai.plmn_id),
mme_ue->tai.tac);
ogs_debug(" OLD E_CGI[PLMN_ID:%06x,CELL_ID:%d]",
ogs_info(" OLD E_CGI[PLMN_ID:%06x,CELL_ID:%d]",
ogs_plmn_id_hexdump(&mme_ue->e_cgi.plmn_id),
mme_ue->e_cgi.cell_id);
@ -1293,6 +1298,9 @@ void s1ap_handle_path_switch_request(
/* Change enb_ue to the NEW eNB */
enb_ue_switch_to_enb(enb_ue, enb);
ogs_info(" NEW ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]",
enb_ue->enb_ue_s1ap_id, enb_ue->mme_ue_s1ap_id);
ogs_assert(EUTRAN_CGI);
pLMNidentity = &EUTRAN_CGI->pLMNidentity;
ogs_assert(pLMNidentity && pLMNidentity->size == sizeof(ogs_plmn_id_t));
@ -1316,10 +1324,10 @@ void s1ap_handle_path_switch_request(
sizeof(enb_ue->saved.e_cgi.cell_id));
enb_ue->saved.e_cgi.cell_id = (be32toh(enb_ue->saved.e_cgi.cell_id) >> 4);
ogs_debug(" TAI[PLMN_ID:%06x,TAC:%d]",
ogs_info(" TAI[PLMN_ID:%06x,TAC:%d]",
ogs_plmn_id_hexdump(&enb_ue->saved.tai.plmn_id),
enb_ue->saved.tai.tac);
ogs_debug(" E_CGI[PLMN_ID:%06x,CELL_ID:%d]",
ogs_info(" E_CGI[PLMN_ID:%06x,CELL_ID:%d]",
ogs_plmn_id_hexdump(&enb_ue->saved.e_cgi.plmn_id),
enb_ue->saved.e_cgi.cell_id);
@ -1413,7 +1421,7 @@ void s1ap_handle_enb_configuration_transfer(
&initiatingMessage->value.choice.ENBConfigurationTransfer;
ogs_assert(ENBConfigurationTransfer);
ogs_debug("[MME] ENB configuration transfer");
ogs_debug("ENB configuration transfer");
for (i = 0; i < ENBConfigurationTransfer->protocolIEs.list.count; i++) {
ie = ENBConfigurationTransfer->protocolIEs.list.array[i];
switch (ie->id) {
@ -1507,7 +1515,7 @@ void s1ap_handle_handover_required(mme_enb_t *enb, ogs_s1ap_message_t *message)
mme_enb_t *target_enb = NULL;
uint32_t target_enb_id = 0;
ogs_debug("[MME] Handover required");
ogs_debug("Handover required");
for (i = 0; i < HandoverRequired->protocolIEs.list.count; i++) {
ie = HandoverRequired->protocolIEs.list.array[i];
switch (ie->id) {
@ -1620,7 +1628,7 @@ void s1ap_handle_handover_request_ack(
&successfulOutcome->value.choice.HandoverRequestAcknowledge;
ogs_assert(HandoverRequestAcknowledge);
ogs_debug("[MME] Handover request acknowledge");
ogs_debug("Handover request acknowledge");
for (i = 0; i < HandoverRequestAcknowledge->protocolIEs.list.count; i++) {
ie = HandoverRequestAcknowledge->protocolIEs.list.array[i];
switch (ie->id) {
@ -1744,7 +1752,7 @@ void s1ap_handle_handover_failure(mme_enb_t *enb, ogs_s1ap_message_t *message)
HandoverFailure = &unsuccessfulOutcome->value.choice.HandoverFailure;
ogs_assert(HandoverFailure);
ogs_debug("[MME] Handover failure");
ogs_debug("Handover failure");
for (i = 0; i < HandoverFailure->protocolIEs.list.count; i++) {
ie = HandoverFailure->protocolIEs.list.array[i];
switch (ie->id) {
@ -1809,7 +1817,7 @@ void s1ap_handle_handover_cancel(mme_enb_t *enb, ogs_s1ap_message_t *message)
HandoverCancel = &initiatingMessage->value.choice.HandoverCancel;
ogs_assert(HandoverCancel);
ogs_debug("[MME] Handover cancel");
ogs_debug("Handover cancel");
for (i = 0; i < HandoverCancel->protocolIEs.list.count; i++) {
ie = HandoverCancel->protocolIEs.list.array[i];
switch (ie->id) {
@ -1853,7 +1861,7 @@ void s1ap_handle_handover_cancel(mme_enb_t *enb, ogs_s1ap_message_t *message)
S1AP_UE_CTX_REL_DELETE_INDIRECT_TUNNEL,
ogs_time_from_msec(300));
ogs_debug("[MME] Handover Cancel : "
ogs_debug("Handover Cancel : "
"UE[eNB-UE-S1AP-ID(%d)] --> eNB[%s:%d]",
source_ue->enb_ue_s1ap_id,
OGS_ADDR(enb->sctp.addr, buf), enb->enb_id);
@ -1884,7 +1892,7 @@ void s1ap_handle_enb_status_transfer(mme_enb_t *enb, ogs_s1ap_message_t *message
ENBStatusTransfer = &initiatingMessage->value.choice.ENBStatusTransfer;
ogs_assert(ENBStatusTransfer);
ogs_debug("[MME] ENB status transfer");
ogs_debug("ENB status transfer");
for (i = 0; i < ENBStatusTransfer->protocolIEs.list.count; i++) {
ie = ENBStatusTransfer->protocolIEs.list.array[i];
switch (ie->id) {
@ -1959,7 +1967,7 @@ void s1ap_handle_handover_notification(
HandoverNotify = &initiatingMessage->value.choice.HandoverNotify;
ogs_assert(HandoverNotify);
ogs_debug("[MME] Handover notification");
ogs_debug("Handover notification");
for (i = 0; i < HandoverNotify->protocolIEs.list.count; i++) {
ie = HandoverNotify->protocolIEs.list.array[i];
switch (ie->id) {
@ -2084,7 +2092,7 @@ void s1ap_handle_s1_reset(
Reset = &initiatingMessage->value.choice.Reset;
ogs_assert(Reset);
ogs_warn("[MME] Reset");
ogs_warn("Reset");
for (i = 0; i < Reset->protocolIEs.list.count; i++) {
ie = Reset->protocolIEs.list.array[i];
@ -2219,7 +2227,7 @@ void s1ap_handle_write_replace_warning_response(
&successfulOutcome->value.choice.WriteReplaceWarningResponse;
ogs_assert(WriteReplaceWarningResponse);
ogs_debug("[MME] Write replace warning response");
ogs_debug("Write replace warning response");
ogs_debug(" IP[%s] ENB_ID[%d]",
OGS_ADDR(enb->sctp.addr, buf), enb->enb_id);
@ -2244,7 +2252,7 @@ void s1ap_handle_kill_response(
&successfulOutcome->value.choice.KillResponse;
ogs_assert(KillResponse);
ogs_debug("[MME] Kill response");
ogs_debug("Kill response");
ogs_debug(" IP[%s] ENB_ID[%d]",
OGS_ADDR(enb->sctp.addr, buf), enb->enb_id);

View File

@ -443,7 +443,7 @@ void s1ap_send_handover_request(
enb_ue_t *source_ue = NULL, *target_ue = NULL;
ogs_debug("[MME] Handover request");
ogs_info("Handover request");
ogs_assert(target_enb);
@ -455,9 +455,9 @@ void s1ap_send_handover_request(
target_ue = enb_ue_add(target_enb, INVALID_UE_S1AP_ID);
ogs_assert(target_ue);
ogs_debug(" Source : ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]",
ogs_info(" Source : ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]",
source_ue->enb_ue_s1ap_id, source_ue->mme_ue_s1ap_id);
ogs_debug(" Target : ENB_UE_S1AP_ID[Unknown] MME_UE_S1AP_ID[%d]",
ogs_info(" Target : ENB_UE_S1AP_ID[Unknown] MME_UE_S1AP_ID[%d]",
target_ue->mme_ue_s1ap_id);
source_ue_associate_target_ue(source_ue, target_ue);

View File

@ -178,25 +178,12 @@ void s1ap_recv_handler(ogs_sock_t *sock)
sock, addr, NULL, 0, 0);
}
break;
case SCTP_SHUTDOWN_EVENT :
case SCTP_SEND_FAILED :
if (not->sn_header.sn_type == SCTP_SHUTDOWN_EVENT)
ogs_debug("SCTP_SHUTDOWN_EVENT:[T:%d, F:0x%x, L:%d]",
not->sn_shutdown_event.sse_type,
not->sn_shutdown_event.sse_flags,
not->sn_shutdown_event.sse_length);
if (not->sn_header.sn_type == SCTP_SEND_FAILED)
#if HAVE_USRSCTP
ogs_error("SCTP_SEND_FAILED:[T:%d, F:0x%x, S:%d]",
not->sn_send_failed_event.ssfe_type,
not->sn_send_failed_event.ssfe_flags,
not->sn_send_failed_event.ssfe_error);
#else
ogs_error("SCTP_SEND_FAILED:[T:%d, F:0x%x, S:%d]",
not->sn_send_failed.ssf_type,
not->sn_send_failed.ssf_flags,
not->sn_send_failed.ssf_error);
#endif
ogs_debug("SCTP_SHUTDOWN_EVENT:[T:%d, F:0x%x, L:%d]",
not->sn_shutdown_event.sse_type,
not->sn_shutdown_event.sse_flags,
not->sn_shutdown_event.sse_length);
addr = ogs_calloc(1, sizeof(ogs_sockaddr_t));
ogs_assert(addr);
@ -205,6 +192,21 @@ void s1ap_recv_handler(ogs_sock_t *sock)
s1ap_event_push(MME_EVT_S1AP_LO_CONNREFUSED,
sock, addr, NULL, 0, 0);
break;
case SCTP_SEND_FAILED :
#if HAVE_USRSCTP
ogs_error("SCTP_SEND_FAILED:[T:%d, F:0x%x, S:%d]",
not->sn_send_failed_event.ssfe_type,
not->sn_send_failed_event.ssfe_flags,
not->sn_send_failed_event.ssfe_error);
#else
ogs_error("SCTP_SEND_FAILED:[T:%d, F:0x%x, S:%d]",
not->sn_send_failed.ssf_type,
not->sn_send_failed.ssf_flags,
not->sn_send_failed.ssf_error);
#endif
break;
case SCTP_PEER_ADDR_CHANGE:
ogs_warn("SCTP_PEER_ADDR_CHANGE:[T:%d, F:0x%x, S:%d]",
not->sn_paddr_change.spc_type,

View File

@ -94,10 +94,10 @@ void s1ap_state_operational(ogs_fsm_t *s, mme_event_t *e)
s1ap_handle_uplink_nas_transport(enb, pdu);
break;
case S1AP_ProcedureCode_id_UECapabilityInfoIndication :
s1ap_handle_ue_capability_info_indication( enb, pdu);
s1ap_handle_ue_capability_info_indication(enb, pdu);
break;
case S1AP_ProcedureCode_id_UEContextReleaseRequest:
s1ap_handle_ue_context_release_request( enb, pdu);
s1ap_handle_ue_context_release_request(enb, pdu);
break;
case S1AP_ProcedureCode_id_PathSwitchRequest:
s1ap_handle_path_switch_request(enb, pdu);

View File

@ -157,7 +157,7 @@ static void bearer_timeout(ogs_gtp_xact_t *xact, void *data)
switch (type) {
case OGS_GTP_DOWNLINK_DATA_NOTIFICATION_TYPE:
ogs_error("[%s] No Downlink Data Notification ACK", sgwc_ue->imsi_bcd);
ogs_warn("[%s] No Downlink Data Notification ACK", sgwc_ue->imsi_bcd);
break;
default:
ogs_error("GTP Timeout : IMSI[%s] Message-Type[%d]",

View File

@ -144,7 +144,7 @@ static void _gtpv1_u_recv_cb(short when, ogs_socket_t fd, void *data)
}
} else {
ogs_error("[DROP] Cannot decode Error-Indication");
ogs_error("[DROP] Cannot find FAR by Error-Indication");
ogs_log_hexdump(OGS_LOG_ERROR, pkbuf->data, pkbuf->len);
}
} else if (gtp_h->type == OGS_GTPU_MSGTYPE_GPDU) {