Commit 8866f3e9 authored by Niuhaiwen's avatar Niuhaiwen

stateless-procedure-with-bad-value-in-pdusessionestablishmentaccept

parent d8a69dde
......@@ -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);
......
......@@ -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");
......
......@@ -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");
......
This diff is collapsed.
......@@ -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);
......
......@@ -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 {
......
......@@ -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 =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment