From 3a30612cbb3bbdd3a500c324d6e5880c3eb3617b Mon Sep 17 00:00:00 2001 From: Spencer Sevilla Date: Tue, 20 Sep 2022 13:36:55 -0700 Subject: [PATCH] first draft of much simpler re-architecture --- src/sgwc/sxa-handler.c | 3 ++- src/sgwu/sxa-handler.c | 2 +- src/smf/n4-handler.c | 6 ++++-- src/upf/n4-handler.c | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/sgwc/sxa-handler.c b/src/sgwc/sxa-handler.c index 59c61c7ddc..51f79dea67 100644 --- a/src/sgwc/sxa-handler.c +++ b/src/sgwc/sxa-handler.c @@ -1218,7 +1218,8 @@ void sgwc_sxa_handle_session_deletion_response( } if (pfcp_rsp->cause.presence) { - if (pfcp_rsp->cause.u8 != OGS_PFCP_CAUSE_REQUEST_ACCEPTED) { + if (pfcp_rsp->cause.u8 != OGS_PFCP_CAUSE_REQUEST_ACCEPTED && + pfcp_rsp->cause.u8 != OGS_PFCP_CAUSE_SESSION_CONTEXT_NOT_FOUND) { ogs_warn("PFCP Cause[%d] : Not Accepted", pfcp_rsp->cause.u8); cause_value = gtp_cause_from_pfcp(pfcp_rsp->cause.u8); } diff --git a/src/sgwu/sxa-handler.c b/src/sgwu/sxa-handler.c index b000626d64..03099b5a4e 100644 --- a/src/sgwu/sxa-handler.c +++ b/src/sgwu/sxa-handler.c @@ -396,7 +396,7 @@ void sgwu_sxa_handle_session_deletion_request( ogs_debug("Session Deletion Request"); if (!sess) { - ogs_error("No Context"); + ogs_warn("No Context"); ogs_pfcp_send_error_message(xact, 0, OGS_PFCP_SESSION_DELETION_RESPONSE_TYPE, OGS_PFCP_CAUSE_SESSION_CONTEXT_NOT_FOUND, 0); diff --git a/src/smf/n4-handler.c b/src/smf/n4-handler.c index 96d9fd468e..99f92c5efa 100644 --- a/src/smf/n4-handler.c +++ b/src/smf/n4-handler.c @@ -633,7 +633,8 @@ int smf_5gc_n4_handle_session_deletion_response( ogs_assert(sess); if (rsp->cause.presence) { - if (rsp->cause.u8 != OGS_PFCP_CAUSE_REQUEST_ACCEPTED) { + if (rsp->cause.u8 != OGS_PFCP_CAUSE_REQUEST_ACCEPTED && + rsp->cause.u8 != OGS_PFCP_CAUSE_SESSION_CONTEXT_NOT_FOUND) { ogs_warn("PFCP Cause [%d] : Not Accepted", rsp->cause.u8); status = sbi_status_from_pfcp(rsp->cause.u8); } @@ -1062,7 +1063,8 @@ uint8_t smf_epc_n4_handle_session_deletion_response( ogs_error("No Cause"); return OGS_PFCP_CAUSE_MANDATORY_IE_MISSING; } - if (rsp->cause.u8 != OGS_PFCP_CAUSE_REQUEST_ACCEPTED) { + if (rsp->cause.u8 != OGS_PFCP_CAUSE_REQUEST_ACCEPTED && + rsp->cause.u8 != OGS_PFCP_CAUSE_SESSION_CONTEXT_NOT_FOUND) { ogs_warn("PFCP Cause[%d] : Not Accepted", rsp->cause.u8); return rsp->cause.u8; } diff --git a/src/upf/n4-handler.c b/src/upf/n4-handler.c index cbfe63c4fc..5b0be6ff43 100644 --- a/src/upf/n4-handler.c +++ b/src/upf/n4-handler.c @@ -461,7 +461,7 @@ void upf_n4_handle_session_deletion_request( ogs_debug("Session Deletion Request"); if (!sess) { - ogs_error("No Context"); + ogs_warn("No Context"); ogs_pfcp_send_error_message(xact, 0, OGS_PFCP_SESSION_DELETION_RESPONSE_TYPE, OGS_PFCP_CAUSE_SESSION_CONTEXT_NOT_FOUND, 0);