[SMF] Handle upCnxState=ACTIVATING by replying with 200 instead of 204

According to TS 29.502 5.2.2.3.2.2., we should reply with a 200 response
including the upCnxState attribute.
This commit is contained in:
mitmitmitm 2022-08-31 10:59:05 +02:00 committed by Sukchan Lee
parent c28faf00ea
commit af1f8d4f4a
3 changed files with 11 additions and 1 deletions

View File

@ -270,6 +270,8 @@ typedef struct smf_sess_s {
* of [POST] /npcf-smpolocycontrol/v1/policies */
char *policy_association_id;
OpenAPI_up_cnx_state_e up_cnx_state;
/* PLMN ID & NID */
ogs_plmn_id_t plmn_id;

View File

@ -400,7 +400,14 @@ void smf_5gc_n4_handle_session_modification_response(
} else {
sess->paging.ue_requested_pdu_session_establishment_done = true;
ogs_assert(true == ogs_sbi_send_http_status_no_content(stream));
if (sess->up_cnx_state == OpenAPI_up_cnx_state_ACTIVATING) {
sess->up_cnx_state = OpenAPI_up_cnx_state_ACTIVATED;
smf_sbi_send_sm_context_updated_data_up_cnx_state(
sess, stream, OpenAPI_up_cnx_state_ACTIVATED);
} else {
ogs_assert(true == ogs_sbi_send_http_status_no_content(stream));
}
}
} else if (flags & OGS_PFCP_MODIFY_DEACTIVATE) {

View File

@ -432,6 +432,7 @@ bool smf_nsmf_handle_update_sm_context(
memset(&SmContextUpdatedData, 0, sizeof(SmContextUpdatedData));
SmContextUpdatedData.up_cnx_state = OpenAPI_up_cnx_state_ACTIVATING;
sess->up_cnx_state = OpenAPI_up_cnx_state_ACTIVATING;
SmContextUpdatedData.n2_sm_info_type =
OpenAPI_n2_sm_info_type_PDU_RES_SETUP_REQ;
SmContextUpdatedData.n2_sm_info = &n2SmInfo;