[PFCP] Revert Changes 5e18b2b

This commit is contained in:
Sukchan Lee 2022-08-03 14:13:35 +09:00
parent 7231dafbf1
commit d21e9aa5e0
2 changed files with 8 additions and 29 deletions

View File

@ -1098,7 +1098,6 @@ void smf_n4_handle_session_report_request(
uint16_t pdr_id = 0;
unsigned int i;
ogs_assert(sess);
ogs_assert(pfcp_xact);
ogs_assert(pfcp_req);
@ -1106,6 +1105,11 @@ void smf_n4_handle_session_report_request(
cause_value = OGS_GTP2_CAUSE_REQUEST_ACCEPTED;
if (!sess) {
ogs_warn("No Context");
cause_value = OGS_PFCP_CAUSE_SESSION_CONTEXT_NOT_FOUND;
}
if (pfcp_req->report_type.presence == 0) {
ogs_error("No Report Type");
cause_value = OGS_GTP2_CAUSE_MANDATORY_IE_MISSING;
@ -1118,6 +1122,7 @@ void smf_n4_handle_session_report_request(
return;
}
ogs_assert(sess);
report_type.value = pfcp_req->report_type.u8;
if (report_type.downlink_data_report) {

View File

@ -222,19 +222,7 @@ void smf_pfcp_state_associated(ogs_fsm_t *s, smf_event_t *e)
case OGS_PFCP_SESSION_ESTABLISHMENT_RESPONSE_TYPE:
if (!message->h.seid_presence) ogs_error("No SEID");
if (!sess) {
ogs_gtp_xact_t *gtp_xact = xact->assoc_xact;
ogs_assert(gtp_xact);
if (gtp_xact->gtp_version == 1)
ogs_gtp1_send_error_message(gtp_xact, 0,
OGS_GTP1_CREATE_PDP_CONTEXT_RESPONSE_TYPE,
OGS_GTP1_CAUSE_CONTEXT_NOT_FOUND);
else
ogs_gtp2_send_error_message(gtp_xact, 0,
OGS_GTP2_CREATE_SESSION_RESPONSE_TYPE,
OGS_GTP2_CAUSE_CONTEXT_NOT_FOUND);
break;
}
ogs_assert(sess);
ogs_fsm_dispatch(&sess->sm, e);
break;
@ -253,21 +241,7 @@ void smf_pfcp_state_associated(ogs_fsm_t *s, smf_event_t *e)
case OGS_PFCP_SESSION_DELETION_RESPONSE_TYPE:
if (!message->h.seid_presence) ogs_error("No SEID");
if (!sess) {
ogs_gtp_xact_t *gtp_xact = xact->assoc_xact;
if (!gtp_xact)
break;
if (gtp_xact->gtp_version == 1)
ogs_gtp1_send_error_message(gtp_xact, 0,
OGS_GTP1_CREATE_PDP_CONTEXT_RESPONSE_TYPE,
OGS_GTP1_CAUSE_CONTEXT_NOT_FOUND);
else
ogs_gtp2_send_error_message(gtp_xact, 0,
OGS_GTP2_CREATE_SESSION_RESPONSE_TYPE,
OGS_GTP2_CAUSE_CONTEXT_NOT_FOUND);
break;
}
ogs_assert(sess);
ogs_fsm_dispatch(&sess->sm, e);
break;