remove unnecessary code [#476] [#477]

This commit is contained in:
Sukchan Lee 2020-06-22 14:17:58 -04:00
parent 8487a2b4b3
commit ee41a751f0
4 changed files with 3 additions and 27 deletions

View File

@ -66,19 +66,8 @@ ogs_pkbuf_t *nas_5gs_security_encode(
amf_ue->ul_count.i32 = 0;
}
if (amf_ue->selected_enc_algorithm == 0) {
if (amf_ue->selected_enc_algorithm == 0)
ciphered = 0;
#if 0 /* Wireshark does not support it */
if (message->h.security_header_type ==
OGS_NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_CIPHERED)
message->h.security_header_type =
OGS_NAS_SECURITY_HEADER_INTEGRITY_PROTECTED;
else if (message->h.security_header_type ==
OGS_NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_CIPHTERD_WITH_NEW_INTEGRITY_CONTEXT)
message->h.security_header_type =
OGS_NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_NEW_SECURITY_CONTEXT;
#endif
}
if (amf_ue->selected_int_algorithm == 0)
integrity_protected = 0;

View File

@ -182,9 +182,6 @@ void upf_pfcp_state_associated(ogs_fsm_t *s, upf_event_t *e)
xact = e->pfcp_xact;
ogs_assert(xact);
xact = e->pfcp_xact;
ogs_assert(xact);
if (message->h.seid_presence && message->h.seid != 0)
sess = upf_sess_find_by_up_seid(message->h.seid);

View File

@ -66,19 +66,8 @@ ogs_pkbuf_t *test_nas_5gs_security_encode(
test_ue->dl_count.i32 = 0;
}
if (test_ue->selected_enc_algorithm == 0) {
if (test_ue->selected_enc_algorithm == 0)
ciphered = 0;
#if 0 /* Wireshark does not support it */
if (message->h.security_header_type ==
OGS_NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_CIPHERED)
message->h.security_header_type =
OGS_NAS_SECURITY_HEADER_INTEGRITY_PROTECTED;
else if (message->h.security_header_type ==
OGS_NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_CIPHTERD_WITH_NEW_INTEGRITY_CONTEXT)
message->h.security_header_type =
OGS_NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_NEW_SECURITY_CONTEXT;
#endif
}
if (test_ue->selected_int_algorithm == 0)
integrity_protected = 0;

View File

@ -35,6 +35,7 @@ const struct testlist {
{test_idle},
{test_dereg},
{test_identity},
{test_gmm_status},
{test_ue_context},
{NULL},
};