Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-AMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
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-AMF
Commits
8866f3e9
Commit
8866f3e9
authored
Aug 05, 2021
by
Niuhaiwen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stateless-procedure-with-bad-value-in-pdusessionestablishmentaccept
parent
d8a69dde
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
182 additions
and
65 deletions
+182
-65
src/amf-app/amf_app.cpp
src/amf-app/amf_app.cpp
+2
-2
src/amf-app/amf_n1.cpp
src/amf-app/amf_n1.cpp
+4
-4
src/amf-app/amf_n2.cpp
src/amf-app/amf_n2.cpp
+3
-2
src/contexts/nas_context.cpp
src/contexts/nas_context.cpp
+160
-55
src/contexts/nas_context.hpp
src/contexts/nas_context.hpp
+9
-2
src/itti/msgs/itti_msg_amf_app.hpp
src/itti/msgs/itti_msg_amf_app.hpp
+2
-0
src/sbi/amf_server/impl/N1N2MessageCollectionDocumentApiImpl.cpp
.../amf_server/impl/N1N2MessageCollectionDocumentApiImpl.cpp
+2
-0
No files found.
src/amf-app/amf_app.cpp
View file @
8866f3e9
...
...
@@ -277,8 +277,8 @@ void amf_app::handle_itti_message(
dl_msg
->
is_n2sm_set
=
true
;
dl_msg
->
n2sm_info_type
=
itti_msg
.
n2sm_info_type
;
}
dl_msg
->
amf_ue_ngap_id
=
amf_n1_inst
->
supi2amfId
.
at
(
itti_msg
.
supi
);
dl_msg
->
ran_ue_ngap_id
=
amf_n1_inst
->
supi2ranId
.
at
(
itti_msg
.
supi
);
dl_msg
->
amf_ue_ngap_id
=
itti_msg
.
amf_ue_ngap_id
;
//
amf_n1_inst->supi2amfId.at(itti_msg.supi);
dl_msg
->
ran_ue_ngap_id
=
itti_msg
.
ran_ue_ngap_id
;
//
amf_n1_inst->supi2ranId.at(itti_msg.supi);
std
::
shared_ptr
<
itti_downlink_nas_transfer
>
i
=
std
::
shared_ptr
<
itti_downlink_nas_transfer
>
(
dl_msg
);
int
ret
=
itti_inst
->
send_msg
(
i
);
...
...
src/amf-app/amf_n1.cpp
View file @
8866f3e9
...
...
@@ -3009,9 +3009,6 @@ bool amf_n1::start_security_mode_control_procedure(
nlohmann::json udsf_response;
nlohmann::json is_current_security_available;
nlohmann::json is_common_procedure_for_security_mode_control_running;
Logger::amf_n1().debug("Start Security Mode Control procedure");
nc.get()->is_common_procedure_for_security_mode_control_running = true;
is_common_procedure_for_security_mode_control_running["Content-ID"] = "is_common_procedure_for_security_mode_control_running";
is_common_procedure_for_security_mode_control_running["Content-Type"] = "varchar(32)";
...
...
@@ -3021,12 +3018,15 @@ bool amf_n1::start_security_mode_control_procedure(
Logger
::
amf_n1
().
debug
(
"Start Security Mode Control procedure"
);
nc
.
get
()
->
is_common_procedure_for_security_mode_control_running
=
true
;
bool
security_context_is_new
=
false
;
uint8_t
amf_nea
=
EA0_5G
;
uint8_t
amf_nia
=
IA0_5G
;
// decide which ea/ia alg used by UE, which is supported by network
security_data_t
*
data
=
(
security_data_t
*
)
calloc
(
1
,
sizeof
(
security_data_t
));
nas_secu_ctx
*
secu_ctx
=
nc
.
get
()
->
security_ctx
;
nas_secu_ctx
*
secu_ctx
=
new
nas_secu_ctx
();
nc
.
get
()
->
security_ctx
=
secu_ctx
;
if
(
!
data
)
Logger
::
amf_n1
().
error
(
"Cannot allocate memory for security_data_t"
);
...
...
src/amf-app/amf_n2.cpp
View file @
8866f3e9
...
...
@@ -529,7 +529,7 @@ bool amf_n2::curl_http_client_udsf(std::string remoteUrl,std::string jsonData,st
curl_easy_getinfo
(
curl
,
CURLINFO_RESPONSE_CODE
,
&
httpCode
);
std
::
string
response
=
*
httpData
.
get
();
//Logger::amf_n2().debug("response from udsf = %s "
,response.c_str());
Logger
::
amf_n2
().
debug
(
"response from udsf =(%d) %s "
,
response
.
length
()
,
response
.
c_str
());
nlohmann
::
json
response_data
=
{};
Logger
::
amf_n2
().
debug
(
"Send message to UDSF, response from UDSF, HTTP Code: %d"
,
httpCode
);
if
(
static_cast
<
http_response_codes_e
>
(
httpCode
)
==
http_response_codes_e
::
HTTP_RESPONSE_CODE_0
)
{
...
...
@@ -543,8 +543,9 @@ bool amf_n2::curl_http_client_udsf(std::string remoteUrl,std::string jsonData,st
Logger
::
sctp
().
info
(
"sending successful when calling %s"
,
remoteUrl
.
c_str
());
try
{
response_data
=
nlohmann
::
json
::
parse
(
response
);
//
response_data = nlohmann::json::parse(response);
udsf_response
=
nlohmann
::
json
::
parse
(
response
);
Logger
::
amf_n2
().
debug
(
"UDSF RESPONSE in curl_http_client_udsf:
\n
%s"
,
udsf_response
.
dump
().
c_str
());
//Logger::amf_n2().debug("Get response with jsonData: %s", response_data.dump().c_str());
}
catch
(
nlohmann
::
json
::
exception
&
e
)
{
Logger
::
amf_n11
().
warn
(
"Could not get Json content from usdf the response"
);
...
...
src/contexts/nas_context.cpp
View file @
8866f3e9
This diff is collapsed.
Click to expand it.
src/contexts/nas_context.hpp
View file @
8866f3e9
...
...
@@ -81,18 +81,24 @@ class nas_context {
uint32_t
nas_context_ran_ue_ngap_id_from_json
(
nlohmann
::
json
j
);
std
::
string
nas_context_nas_status_from_json
(
nlohmann
::
json
j
);
int
nas_context__5gmm_state_from_json
(
nlohmann
::
json
j
);
uint8_t
nas_context_registration_type_from_json
(
nlohmann
::
json
j
);
bool
nas_context_follow_on_req_pending_ind_from_json
(
nlohmann
::
json
j
);
uint8_t
nas_context_ngKsi_from_json
(
nlohmann
::
json
j
);
std
::
string
nas_context_imsi_from_json
(
nlohmann
::
json
j
);
//ok
std
::
string
nas_context_imsi_from_json
(
nlohmann
::
json
j
);
//ok
// uint8_t mmCapability;
uint8_t
nas_context_mmCapability_from_json
(
nlohmann
::
json
j
);
// uint8_t ueSecurityCaplen;
uint8_t
nas_context_ueSecurityCaplen_from_json
(
nlohmann
::
json
j
);
// uint8_t ueSecurityCapEnc;
uint8_t
nas_context_ueSecurityCapEnc_from_json
(
nlohmann
::
json
j
);
// uint8_t ueSecurityCapInt;
uint8_t
nas_context_ueSecurityCapInt_from_json
(
nlohmann
::
json
j
);
// uint8_t ueSecurityCapEEnc;
uint8_t
nas_context_ueSecurityCapEEnc_from_json
(
nlohmann
::
json
j
);
// uint8_t ueSecurityCapEInt;
uint8_t
nas_context_ueSecurityCapEInt_from_json
(
nlohmann
::
json
j
);
//void nas_context_requestedNssai_from_json(nlohmann::json j);
std
::
string
nas_context_serving_network_from_json
(
nlohmann
::
json
j
);
...
...
@@ -104,6 +110,7 @@ class nas_context {
bool
nas_context_is_common_procedure_for_identification_running_from_json
(
nlohmann
::
json
j
);
bool
nas_context_is_common_procedure_for_security_mode_control_running_from_json
(
nlohmann
::
json
j
);
bool
nas_context_is_common_procedure_for_nas_transport_running_from_json
(
nlohmann
::
json
j
);
void
nas_context__vector_from_json
(
nlohmann
::
json
j
);
void
nas_context__5g_he_av_from_json
(
nlohmann
::
json
j
);
void
nas_context__5g_av_from_json
(
nlohmann
::
json
j
);
...
...
src/itti/msgs/itti_msg_amf_app.hpp
View file @
8866f3e9
...
...
@@ -58,6 +58,8 @@ class itti_n1n2_message_transfer_request : public itti_msg_amf_app {
uint8_t
pdu_session_id
;
std
::
string
n2sm_info_type
;
// other parameters
long
amf_ue_ngap_id
;
uint32_t
ran_ue_ngap_id
;
};
class
itti_test_signalling_paging
:
public
itti_msg_amf_app
{
...
...
src/sbi/amf_server/impl/N1N2MessageCollectionDocumentApiImpl.cpp
View file @
8866f3e9
...
...
@@ -158,6 +158,8 @@ std::shared_ptr<pdu_session_context> psc = std::shared_ptr<pdu_session_context>(
itti_msg
->
is_n1sm_set
=
true
;
itti_msg
->
n2sm
=
n2sm
;
itti_msg
->
is_n2sm_set
=
true
;
itti_msg
->
amf_ue_ngap_id
=
psc
.
get
()
->
amf_ue_ngap_id
;
itti_msg
->
ran_ue_ngap_id
=
psc
.
get
()
->
ran_ue_ngap_id
;
itti_msg
->
pdu_session_id
=
(
uint8_t
)
n1N2MessageTransferReqData
.
getPduSessionId
();
std
::
shared_ptr
<
itti_n1n2_message_transfer_request
>
i
=
...
...
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