Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-SMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-SMF
Commits
7af3fc9f
Commit
7af3fc9f
authored
Dec 01, 2022
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue for PDU session context update response
parent
889ce79c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
234 additions
and
221 deletions
+234
-221
src/smf_app/smf_context.cpp
src/smf_app/smf_context.cpp
+234
-221
No files found.
src/smf_app/smf_context.cpp
View file @
7af3fc9f
...
@@ -4915,6 +4915,7 @@ bool smf_context::check_handover_possibility(
...
@@ -4915,6 +4915,7 @@ bool smf_context::check_handover_possibility(
return
true
;
return
true
;
}
}
//------------------------------------------------------------------------------
void
smf_context
::
send_pdu_session_create_response
(
void
smf_context
::
send_pdu_session_create_response
(
const
std
::
shared_ptr
<
itti_n11_create_sm_context_response
>&
resp
)
{
const
std
::
shared_ptr
<
itti_n11_create_sm_context_response
>&
resp
)
{
// fill content for N1N2MessageTransfer (including N1, N2 SM)
// fill content for N1N2MessageTransfer (including N1, N2 SM)
...
@@ -5034,6 +5035,7 @@ void smf_context::send_pdu_session_create_response(
...
@@ -5034,6 +5035,7 @@ void smf_context::send_pdu_session_create_response(
}
}
}
}
//------------------------------------------------------------------------------
// TODO refactor: Break down this function and split logic (e.g. setting PDU
// TODO refactor: Break down this function and split logic (e.g. setting PDU
// session values) from actual response, we should only need resp here
// session values) from actual response, we should only need resp here
void
smf_context
::
send_pdu_session_update_response
(
void
smf_context
::
send_pdu_session_update_response
(
...
@@ -5050,7 +5052,8 @@ void smf_context::send_pdu_session_update_response(
...
@@ -5050,7 +5052,8 @@ void smf_context::send_pdu_session_update_response(
// TODO: Optional: send ITTI message to N10 to trigger UDM registration
// TODO: Optional: send ITTI message to N10 to trigger UDM registration
// (Nudm_UECM_Registration) see TS29503_Nudm_UECM.yaml (
// (Nudm_UECM_Registration) see TS29503_Nudm_UECM.yaml (
// /{ueId}/registrations/smf-registrations/{pduSessionId}:)
// /{ueId}/registrations/smf-registrations/{pduSessionId}:)
if
(
resp
->
res
.
get_cause
()
!=
static_cast
<
uint8_t
>
(
cause_value_5gsm_e
::
CAUSE_255_REQUEST_ACCEPTED
))
{
switch
(
session_procedure_type
)
{
switch
(
session_procedure_type
)
{
// PDU Session Establishment UE-Requested
// PDU Session Establishment UE-Requested
case
session_management_procedures_type_e
:
:
case
session_management_procedures_type_e
:
:
...
@@ -5130,14 +5133,16 @@ void smf_context::send_pdu_session_update_response(
...
@@ -5130,14 +5133,16 @@ void smf_context::send_pdu_session_update_response(
case
session_management_procedures_type_e
:
:
case
session_management_procedures_type_e
:
:
PDU_SESSION_MODIFICATION_UE_INITIATED_STEP2:
{
PDU_SESSION_MODIFICATION_UE_INITIATED_STEP2:
{
// No need to create N1/N2 Container
// No need to create N1/N2 Container
Logger
::
smf_app
().
info
(
"PDU Session Modification UE-initiated (Step 2)"
);
Logger
::
smf_app
().
info
(
"PDU Session Modification UE-initiated (Step 2)"
);
}
break
;
}
break
;
// PDU Session Modification UE-initiated (Step 3)
// PDU Session Modification UE-initiated (Step 3)
case
session_management_procedures_type_e
:
:
case
session_management_procedures_type_e
:
:
PDU_SESSION_MODIFICATION_UE_INITIATED_STEP3:
{
PDU_SESSION_MODIFICATION_UE_INITIATED_STEP3:
{
// No need to create N1/N2 Container
// No need to create N1/N2 Container
Logger
::
smf_app
().
info
(
"PDU Session Modification UE-initiated (Step 3)"
);
Logger
::
smf_app
().
info
(
"PDU Session Modification UE-initiated (Step 3)"
);
// TODO: To be completed
// TODO: To be completed
}
break
;
}
break
;
...
@@ -5151,13 +5156,14 @@ void smf_context::send_pdu_session_update_response(
...
@@ -5151,13 +5156,14 @@ void smf_context::send_pdu_session_update_response(
// N1 SM
// N1 SM
smf_n1
::
get_instance
().
create_n1_pdu_session_release_command
(
smf_n1
::
get_instance
().
create_n1_pdu_session_release_command
(
resp
->
res
,
n1_sm_msg
,
resp
->
res
,
n1_sm_msg
,
cause_value_5gsm_e
::
CAUSE_26_INSUFFICIENT_RESOURCES
);
// TODO: check
cause_value_5gsm_e
::
CAUSE_26_INSUFFICIENT_RESOURCES
);
// TODO:
// check
// Cause
// Cause
conv
::
convert_string_2_hex
(
n1_sm_msg
,
n1_sm_msg_hex
);
conv
::
convert_string_2_hex
(
n1_sm_msg
,
n1_sm_msg_hex
);
resp
->
res
.
set_n1_sm_message
(
n1_sm_msg_hex
);
resp
->
res
.
set_n1_sm_message
(
n1_sm_msg_hex
);
// include N2 SM Resource Release Request only when User Plane connection
// include N2 SM Resource Release Request only when User Plane
//
is activated
// connection
is activated
if
(
sps
->
get_upCnx_state
()
==
upCnx_state_e
::
UPCNX_STATE_ACTIVATED
)
{
if
(
sps
->
get_upCnx_state
()
==
upCnx_state_e
::
UPCNX_STATE_ACTIVATED
)
{
// N2 SM Information
// N2 SM Information
smf_n2
::
get_instance
()
smf_n2
::
get_instance
()
...
@@ -5186,7 +5192,8 @@ void smf_context::send_pdu_session_update_response(
...
@@ -5186,7 +5192,8 @@ void smf_context::send_pdu_session_update_response(
}
else
{
}
else
{
// fill the content of SmContextUpdatedData
// fill the content of SmContextUpdatedData
nlohmann
::
json
json_data
=
{};
nlohmann
::
json
json_data
=
{};
json_data
[
"n1MessageContainer"
][
"n1MessageClass"
]
=
N1N2_MESSAGE_CLASS
;
json_data
[
"n1MessageContainer"
][
"n1MessageClass"
]
=
N1N2_MESSAGE_CLASS
;
json_data
[
"n1MessageContainer"
][
"n1MessageContent"
][
"contentId"
]
=
json_data
[
"n1MessageContainer"
][
"n1MessageContent"
][
"contentId"
]
=
N1_SM_CONTENT_ID
;
N1_SM_CONTENT_ID
;
resp
->
res
.
set_json_data
(
json_data
);
resp
->
res
.
set_json_data
(
json_data
);
...
@@ -5267,7 +5274,8 @@ void smf_context::send_pdu_session_update_response(
...
@@ -5267,7 +5274,8 @@ void smf_context::send_pdu_session_update_response(
}
break
;
}
break
;
case
session_management_procedures_type_e
:
:
N2_HO_PREPARATION_PHASE_STEP2
:
{
case
session_management_procedures_type_e
:
:
N2_HO_PREPARATION_PHASE_STEP2:
{
// Create N2 SM Information: Handover Command Transfer IE
// Create N2 SM Information: Handover Command Transfer IE
// N2 SM Information
// N2 SM Information
...
@@ -5298,6 +5306,10 @@ void smf_context::send_pdu_session_update_response(
...
@@ -5298,6 +5306,10 @@ void smf_context::send_pdu_session_update_response(
"Unknown session procedure type %d"
,
session_procedure_type
);
"Unknown session procedure type %d"
,
session_procedure_type
);
}
}
}
}
}
else
{
resp
->
res
.
set_http_code
(
http_status_code_e
::
HTTP_STATUS_CODE_406_NOT_ACCEPTABLE
);
}
// send ITTI message to SMF_APP interface to trigger
// send ITTI message to SMF_APP interface to trigger
// SessionUpdateSMContextResponse towards AMFs
// SessionUpdateSMContextResponse towards AMFs
...
@@ -5320,6 +5332,7 @@ void smf_context::send_pdu_session_update_response(
...
@@ -5320,6 +5332,7 @@ void smf_context::send_pdu_session_update_response(
// see step 17@section 4.3.2.2.1@3GPP TS 23.502
// see step 17@section 4.3.2.2.1@3GPP TS 23.502
}
}
//------------------------------------------------------------------------------
void
smf_context
::
send_pdu_session_release_response
(
void
smf_context
::
send_pdu_session_release_response
(
const
std
::
shared_ptr
<
itti_n11_release_sm_context_request
>&
req
,
const
std
::
shared_ptr
<
itti_n11_release_sm_context_request
>&
req
,
const
std
::
shared_ptr
<
itti_n11_release_sm_context_response
>&
resp
,
const
std
::
shared_ptr
<
itti_n11_release_sm_context_response
>&
resp
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment