Commit 283f489b authored by Yann Garcia's avatar Yann Garcia
Browse files

Major bu fixed in sequence number calculation

parent ab0c2fc5
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -4049,8 +4049,8 @@ module NGAP_TCFunctions {
                  f_recv_NGAP_PDU(
                  f_recv_NGAP_PDU(
                                  mw_ngap_initMsg(
                                  mw_ngap_initMsg(
                                                  mw_n2_PDUSessionResourceSetupRequest(
                                                  mw_n2_PDUSessionResourceSetupRequest(
                                                                                       PX_AMF_UE_NGAP_ID,
                                                                                       vc_AMF_UE_ID,
                                                                                       PX_RAN_UE_NGAP_ID,
                                                                                       vc_RAN_UE_ID/*,
                                                                                       {
                                                                                       {
                                                                                         mw_pDUSessionResourceSetupItemSUReq(
                                                                                         mw_pDUSessionResourceSetupItemSUReq(
                                                                                           PX_PDU_SESSION_ID,
                                                                                           PX_PDU_SESSION_ID,
@@ -4063,7 +4063,7 @@ module NGAP_TCFunctions {
                                                                                           -,//in template (omit) NAS_PDU p_pDUSessionNAS_PDU := omit,
                                                                                           -,//in template (omit) NAS_PDU p_pDUSessionNAS_PDU := omit,
                                                                                           -//in template (omit) PDUSessionResourceSetupItemSUReq.iE_Extensions p_iE_Extensions := omit
                                                                                           -//in template (omit) PDUSessionResourceSetupItemSUReq.iE_Extensions p_iE_Extensions := omit
                                                                                         )
                                                                                         )
                                                                                       }//in template (value) PDUSessionResourceSetupListSUReq p_pDUSessionResourceSetupListSUReq
                                                                                       }*///in template (value) PDUSessionResourceSetupListSUReq p_pDUSessionResourceSetupListSUReq
                                  )));
                                  )));
                  f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict());
                  f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict());
                  log("*** " & __SCOPE__ & ": INFO: Testbody done. ***");
                  log("*** " & __SCOPE__ & ": INFO: Testbody done. ***");
+4 −3
Original line number Original line Diff line number Diff line
@@ -485,6 +485,8 @@ module LibNGAP_Functions {
        f_5g_security_context(v_message.security_Mode_Command, vc_ng_nas_security_params_type);
        f_5g_security_context(v_message.security_Mode_Command, vc_ng_nas_security_params_type);
        vc_previous_nas_count_ul := f_NasCountInit();
        vc_previous_nas_count_ul := f_NasCountInit();
        vc_previous_nas_count_dl := f_NasCountInit();
        vc_previous_nas_count_dl := f_NasCountInit();
        log("f_await_security_mode_command_send_security_mode_complete: vc_previous_nas_count_ul: ", vc_previous_nas_count_ul);
        log("f_await_security_mode_command_send_security_mode_complete: vc_previous_nas_count_dl: ", vc_previous_nas_count_dl);


        // Prepare response for SECURITY_MODE_COMPLETE
        // Prepare response for SECURITY_MODE_COMPLETE
        // 1. Registration Request message with no 
        // 1. Registration Request message with no 
@@ -1269,7 +1271,8 @@ module LibNGAP_Functions {
                                                                            ?  // DaylightSavingTime
                                                                            ?  // DaylightSavingTime
                                                                            ),
                                                                            ),
                                         vc_ng_nas_security_params_type, 
                                         vc_ng_nas_security_params_type, 
                                         vc_previous_nas_count_dl, v_message
                                         vc_previous_nas_count_dl, 
                                         v_message
                                         ) == false) {
                                         ) == false) {
            log("*** " & __SCOPE__ & ": FAIL: NG_CONFIGURATION_UPDATE_COMMAND mismatch. ***");
            log("*** " & __SCOPE__ & ": FAIL: NG_CONFIGURATION_UPDATE_COMMAND mismatch. ***");
            setverdict(fail);
            setverdict(fail);
@@ -1591,7 +1594,6 @@ module LibNGAP_Functions {
                                                                        p_bearerId,
                                                                        p_bearerId,
                                                                        p_direction);
                                                                        p_direction);
        log("f_EncodeAndCipher_NG_NasPdu_v: v_calculated_mac: ", v_calculated_mac);
        log("f_EncodeAndCipher_NG_NasPdu_v: v_calculated_mac: ", v_calculated_mac);
        p_nas_count := v_calculated_mac;


        // Security protected NAS message
        // Security protected NAS message
        var NG_NAS_DL_Message_Type v := valueof(
        var NG_NAS_DL_Message_Type v := valueof(
@@ -1604,7 +1606,6 @@ module LibNGAP_Functions {
        p_ng_security_protected_nas_message := v.security_Protected_Nas_Message;
        p_ng_security_protected_nas_message := v.security_Protected_Nas_Message;
        v_EncodedNasPdu := bit2oct(encvalue(p_ng_security_protected_nas_message));
        v_EncodedNasPdu := bit2oct(encvalue(p_ng_security_protected_nas_message));


        log("<<< f_EncodeAndCipher_NG_NasPdu_v: p_nas_count: ", p_nas_count);
        log("<<< f_EncodeAndCipher_NG_NasPdu_v: p_ng_security_protected_nas_message: ", p_ng_security_protected_nas_message);
        log("<<< f_EncodeAndCipher_NG_NasPdu_v: p_ng_security_protected_nas_message: ", p_ng_security_protected_nas_message);
        log("<<< f_EncodeAndCipher_NG_NasPdu_v: ", v_EncodedNasPdu);
        log("<<< f_EncodeAndCipher_NG_NasPdu_v: ", v_EncodedNasPdu);
        return v_EncodedNasPdu;
        return v_EncodedNasPdu;