Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pfcp] idempotent session deletion request/response #51

Open
wants to merge 1 commit into
base: v2.4.10_temp
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/sgwc/sxa-handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/sgwu/sxa-handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 4 additions & 2 deletions src/smf/n4-handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 2 additions & 0 deletions src/smf/pfcp-sm.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,8 @@ void smf_pfcp_state_associated(ogs_fsm_t *s, smf_event_t *e)
if (!message->h.seid_presence) ogs_error("No SEID");

if (!sess) {
ogs_warn("No session associated with Session Deletion Response");

ogs_gtp_xact_t *gtp_xact = xact->assoc_xact;
if (!gtp_xact) {
ogs_error("No associated GTP transaction");
Expand Down
2 changes: 1 addition & 1 deletion src/upf/n4-handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down