mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-05 15:24:14 +00:00
[AMF] security protection (UERANSIM-issues316)
1. Allocate ngKSI other than the value already used. 2. Add the protection of Service request 3. fix SBI convert error ng_ap_cause
This commit is contained in:
parent
b0e8dbb31a
commit
5ea9b22209
384 changed files with 226 additions and 2699 deletions
|
|
@ -172,10 +172,6 @@ cJSON *OpenAPI_sm_policy_context_data_convertToJSON(OpenAPI_sm_policy_context_da
|
|||
}
|
||||
}
|
||||
|
||||
if (!sm_policy_context_data->supi) {
|
||||
ogs_error("OpenAPI_sm_policy_context_data_convertToJSON() failed [supi]");
|
||||
goto end;
|
||||
}
|
||||
if (cJSON_AddStringToObject(item, "supi", sm_policy_context_data->supi) == NULL) {
|
||||
ogs_error("OpenAPI_sm_policy_context_data_convertToJSON() failed [supi]");
|
||||
goto end;
|
||||
|
|
@ -197,19 +193,11 @@ cJSON *OpenAPI_sm_policy_context_data_convertToJSON(OpenAPI_sm_policy_context_da
|
|||
}
|
||||
}
|
||||
|
||||
if (!sm_policy_context_data->pdu_session_id) {
|
||||
ogs_error("OpenAPI_sm_policy_context_data_convertToJSON() failed [pdu_session_id]");
|
||||
goto end;
|
||||
}
|
||||
if (cJSON_AddNumberToObject(item, "pduSessionId", sm_policy_context_data->pdu_session_id) == NULL) {
|
||||
ogs_error("OpenAPI_sm_policy_context_data_convertToJSON() failed [pdu_session_id]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (!sm_policy_context_data->pdu_session_type) {
|
||||
ogs_error("OpenAPI_sm_policy_context_data_convertToJSON() failed [pdu_session_type]");
|
||||
goto end;
|
||||
}
|
||||
if (cJSON_AddStringToObject(item, "pduSessionType", OpenAPI_pdu_session_type_ToString(sm_policy_context_data->pdu_session_type)) == NULL) {
|
||||
ogs_error("OpenAPI_sm_policy_context_data_convertToJSON() failed [pdu_session_type]");
|
||||
goto end;
|
||||
|
|
@ -222,10 +210,6 @@ cJSON *OpenAPI_sm_policy_context_data_convertToJSON(OpenAPI_sm_policy_context_da
|
|||
}
|
||||
}
|
||||
|
||||
if (!sm_policy_context_data->dnn) {
|
||||
ogs_error("OpenAPI_sm_policy_context_data_convertToJSON() failed [dnn]");
|
||||
goto end;
|
||||
}
|
||||
if (cJSON_AddStringToObject(item, "dnn", sm_policy_context_data->dnn) == NULL) {
|
||||
ogs_error("OpenAPI_sm_policy_context_data_convertToJSON() failed [dnn]");
|
||||
goto end;
|
||||
|
|
@ -238,10 +222,6 @@ cJSON *OpenAPI_sm_policy_context_data_convertToJSON(OpenAPI_sm_policy_context_da
|
|||
}
|
||||
}
|
||||
|
||||
if (!sm_policy_context_data->notification_uri) {
|
||||
ogs_error("OpenAPI_sm_policy_context_data_convertToJSON() failed [notification_uri]");
|
||||
goto end;
|
||||
}
|
||||
if (cJSON_AddStringToObject(item, "notificationUri", sm_policy_context_data->notification_uri) == NULL) {
|
||||
ogs_error("OpenAPI_sm_policy_context_data_convertToJSON() failed [notification_uri]");
|
||||
goto end;
|
||||
|
|
@ -416,10 +396,6 @@ cJSON *OpenAPI_sm_policy_context_data_convertToJSON(OpenAPI_sm_policy_context_da
|
|||
}
|
||||
}
|
||||
|
||||
if (!sm_policy_context_data->slice_info) {
|
||||
ogs_error("OpenAPI_sm_policy_context_data_convertToJSON() failed [slice_info]");
|
||||
goto end;
|
||||
}
|
||||
cJSON *slice_info_local_JSON = OpenAPI_snssai_convertToJSON(sm_policy_context_data->slice_info);
|
||||
if (slice_info_local_JSON == NULL) {
|
||||
ogs_error("OpenAPI_sm_policy_context_data_convertToJSON() failed [slice_info]");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue