diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn index ec1f80624..0d46bc6d4 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -739,9 +739,19 @@ runs on MSC_ConnHdlr { alt { /* RSL/UE Side */ - [] RSL.receive(tr_RSL_ENCR_CMD(g_chan_nr, ?, alg_rsl, expect_kc)) -> value rsl { + [] RSL.receive(tr_RSL_ENCR_CMD(g_chan_nr, ?, alg_rsl, ?)) -> value rsl { var PDU_ML3_NW_MS l3 := dec_PDU_ML3_NW_MS(rsl.ies[3].body.l3_info.payload); log("Rx L3 from net: ", l3); + + var RSL_IE_Body encr_info; + if (not f_rsl_find_ie(rsl, RSL_IE_ENCR_INFO, encr_info)) { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Missing Encryption IE in RSL ENCR CMD"); + } else { + if (not match(encr_info, tr_EncrInfo(alg_rsl, expect_kc))) { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + "Unexpected Kc in Encryption IE in RSL ENCR CMD"); + } + } if (ischosen(l3.msgs.rrm.cipheringModeCommand)) { f_rsl_reply(ts_RRM_CiphModeCompl, rsl); }