bsc: TC_ho_int: verify TSC in HandoverCommand

For intra-BSC handovers, also verify the correct Training Sequence Code
in the RR Handover Command (not only in the Channel Activation as added
in previous patch).

Related: SYS#4895 OS#5244
Related: Iae20df4387c3d75752301bd5daeeea7508966393 (osmo-bsc)
Change-Id: I32e3553581eb17812082f1f2ee96cc978e8db668
This commit is contained in:
Neels Hofmeyr 2021-10-02 14:52:28 +02:00
parent c2cf45481a
commit c741fcb426
2 changed files with 21 additions and 4 deletions

View File

@ -5079,7 +5079,8 @@ private function f_tc_ho_int(charstring id) runs on MSC_ConnHdlr {
var HandoverState hs := {
rr_ho_cmpl_seen := false,
handover_done := false,
old_chan_nr := -
old_chan_nr := -,
expect_target_tsc := BTS_TSC[1]
};
/* issue hand-over command on VTY, from BTS 0 to BTS 1 */
f_vty_handover(BSCVTY, 0, 0, g_chan_nr, 1);
@ -5197,7 +5198,8 @@ private function f_tc_ho_int_radio_link_failure(charstring id) runs on MSC_ConnH
var HandoverState hs := {
rr_ho_cmpl_seen := false,
handover_done := false,
old_chan_nr := -
old_chan_nr := -,
expect_target_tsc := BTS_TSC[1]
};
/* issue hand-over command on VTY */
f_vty_handover(BSCVTY, 0, 0, g_chan_nr, 1);
@ -9347,7 +9349,8 @@ private function f_tc_ho_during_lcs_loc_req(charstring id) runs on MSC_ConnHdlr
var HandoverState hs := {
rr_ho_cmpl_seen := false,
handover_done := false,
old_chan_nr := -
old_chan_nr := -,
expect_target_tsc := BTS_TSC[1]
};
/* issue hand-over command on VTY */
f_vty_handover(BSCVTY, 0, 0, g_chan_nr, 1);

View File

@ -1467,7 +1467,8 @@ type record HandoverState {
boolean rr_ho_cmpl_seen,
integer mdcx_seen_before_ho,
boolean handover_done,
RslChannelNr old_chan_nr
RslChannelNr old_chan_nr,
uint3_t expect_target_tsc optional
};
altstep as_handover(inout HandoverState st) runs on MSC_ConnHdlr {
@ -1482,6 +1483,19 @@ altstep as_handover(inout HandoverState st) runs on MSC_ConnHdlr {
new_chan_nr, arfcn);
/* FIXME: Determine TRX NR by ARFCN, instead of hard-coded TRX0! */
/* Verify correct TSC in handoverCommand */
if (ispresent(st.expect_target_tsc)) {
var uint3_t got_tsc := rr_chan_desc_tsc(l3.msgs.rrm.handoverCommand.channelDescription2);
if (not match(got_tsc, st.expect_target_tsc)) {
setverdict(fail, "RR Handover Command: unexpected TSC in Channel Description: expected ",
st.expect_target_tsc, " got ", got_tsc);
mtc.stop;
} else {
log("handoverCommand: verified TSC = ", got_tsc, " (matches ",
st.expect_target_tsc, ")");
}
}
/* register our component for this channel number at the RSL Emulation */
f_rslem_register(0, new_chan_nr, RSL1_PROC);