gbproxy: Introduce TC_overload

When the SGSN is sending an OVERLOAD message, we expect that to
propagate down to every BSS on the other side.

Change-Id: Ic61fabd9c633bcb3f256fe7aa5834e66cc66a4fb
This commit is contained in:
Harald Welte 2020-11-28 16:11:11 +01:00
parent c0351d1015
commit f20af41003
3 changed files with 63 additions and 1 deletions

View File

@ -1905,6 +1905,35 @@ testcase TC_llc_discarded() runs on test_CT
f_cleanup();
}
/* Send an OVERLOAD from SGSN side and expect it to show up on each PCU (SIG BVC) */
testcase TC_overload() runs on GlobalTest_CT
{
f_init();
f_global_init();
var template (value) PDU_BSSGP pdu_tx := ts_OVERLOAD('1'B);
var template (present) PDU_BSSGP exp_rx := tr_OVERLOAD('1'B);
var ro_default defaults := {};
for (var integer i := 0; i < lengthof(g_pcu); i := i+1) {
activate(as_bssgp_g_pcu_count(i, exp_rx, g_roi));
}
G_SGSN[0].send(pdu_tx);
f_sleep(2.0);
for (var integer i := 0; i < lengthof(defaults); i := i+1) {
deactivate(defaults[i]);
}
for (var integer i := 0; i < lengthof(g_pcu); i := i+1) {
if (not ro_integer_contains(g_roi, i)) {
setverdict(fail, "Failed to receive OVERLOAD on PCU index ", i);
}
}
setverdict(pass);
f_cleanup();
}
private function f_block_ptp_bvc_from_pcu(integer pcu_idx, integer bvc_idx) runs on test_CT
{
var BSSGP_BVC_CT bvc_ct := g_pcu[pcu_idx].vc_BSSGP_BVC[bvc_idx];
@ -2138,6 +2167,7 @@ control {
execute( TC_resume() );
execute( TC_trace() );
execute( TC_llc_discarded() );
execute( TC_overload() );
execute( TC_bvc_block_ptp() );
execute( TC_bvc_unblock_ptp() );
execute( TC_bvc_reset_ptp_from_bss() );

View File

@ -302,7 +302,7 @@ altstep as_sig_wait_reset() runs on BSSGP_CT {
private template PDU_BSSGP tr_GLOBAL := (
{pDU_BSSGP_SUSPEND:=?}, {pDU_BSSGP_SUSPEND_ACK:=?}, {pDU_BSSGP_SUSPEND_NACK:=?},
{pDU_BSSGP_RESUME:=?}, {pDU_BSSGP_RESUME_ACK:=?}, {pDU_BSSGP_RESUME_NACK:=?},
{pDU_BSSGP_SGSN_INVOKE_TRACE:=?}
{pDU_BSSGP_SGSN_INVOKE_TRACE:=?}, {pDU_BSSGP_OVERLOAD:=?}
);
/* We are in BVC_S_UNBLOCKED state */

View File

@ -2077,6 +2077,38 @@ octetstring sdu) := {
}
}
/* 10.4.36 */
template (value) PDU_BSSGP
ts_OVERLOAD(template (value) BIT1 priority_class) := {
pDU_BSSGP_OVERLOAD := {
bssgpPduType := '42'O,
priority_Class_Indicator := {
iEI := '8f'O,
ext := '1'B,
lengthIndicator := {
length1 := 1
},
priority_Class_Indicator_Value := priority_class,
spare := '0000000'B
}
}
}
template (present) PDU_BSSGP
tr_OVERLOAD(template (present) BIT1 priority_class) := {
pDU_BSSGP_OVERLOAD := {
bssgpPduType := '42'O,
priority_Class_Indicator := {
iEI := '8f'O,
ext := '1'B,
lengthIndicator := {
length1 := 1
},
priority_Class_Indicator_Value := priority_class,
spare := '0000000'B
}
}
}
/* PDU permitted on PTP BVC only (TS 48.018 Section 5.4.1) */
template (present) PDU_BSSGP tr_BSSGP_PERMITTED_PTP_ONLY := (
{pDU_BSSGP_DL_UNITDATA := ?},