bsc: Verify ms power level value from RSL IE MS Power during CHAN ACT

Change-Id: I0a632156420251b14d1bbfd4ca19dc2bdf5a5f1e
This commit is contained in:
Pau Espin 2019-10-28 15:07:08 +01:00
parent 3d008ae837
commit f7630a6498
2 changed files with 17 additions and 0 deletions

View File

@ -526,6 +526,7 @@ type record TestHdlrParams {
TestHdlrEncrParams encr optional,
TestHdlrParamsLcls lcls,
TestHdlrParamsHandover handover optional,
uint5_t exp_ms_power_level,
boolean aoip,
boolean use_osmux
};
@ -551,6 +552,7 @@ template (value) TestHdlrParams t_def_TestHdlrPars := {
adjust_cx_exp := true
},
handover := omit,
exp_ms_power_level := 7, /* calculated from osmo-bsc.cfg "ms max power" */
aoip := true,
use_osmux := false
}
@ -739,6 +741,7 @@ private template RSL_IE_Body tr_EncrInfo(template RSL_AlgId alg, template octets
private function f_check_chan_act(AssignmentState st, RSL_Message chan_act) runs on MSC_ConnHdlr {
var RSL_IE_Body encr_info;
var RSL_IE_Body ms_power_param;
var RSL_IE_Body ms_power;
if (ispresent(g_pars.encr) and g_pars.encr.enc_alg != '01'O) {
if (not f_rsl_find_ie(chan_act, RSL_IE_ENCR_INFO, encr_info)) {
@ -763,6 +766,14 @@ private function f_check_chan_act(AssignmentState st, RSL_Message chan_act) runs
Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "IE MS Power Parameters not found in CHAN ACT");
}
if (not f_rsl_find_ie(chan_act, RSL_IE_MS_POWER, ms_power)) {
Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "IE MS Power not found in CHAN ACT");
} else {
if (not match(ms_power.ms_power, tr_RSL_IE_MS_Power(g_pars.exp_ms_power_level, false))) {
Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Wrong MS Power IE in CHAN ACT");
}
}
}
altstep as_assignment(inout AssignmentState st) runs on MSC_ConnHdlr {

View File

@ -454,6 +454,12 @@ module RSL_Types {
boolean fpc_epc,
uint5_t power_level
}
template RSL_IE_MS_Power tr_RSL_IE_MS_Power(template uint5_t power_level := ?,
template boolean fpc_epc := false) := {
reserved := 0,
fpc_epc := fpc_epc,
power_level := power_level
}
template (value) RSL_IE_MS_Power ts_RSL_IE_MS_Power(uint5_t power_level,
boolean fpc_epc := false) := {
reserved := 0,