From 0d5fceb146e4044e843804252a2f20bf27b0c475 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 29 Nov 2020 16:04:07 +0100 Subject: [PATCH] gbproxy: Test for sizes up to 1600 bytes, not just 1024 bytes The NS specs state up to 1600 bytes "gross NS size" must be supported, at least by the underlying FR layer. Let's test up to that. Let's also speed things up by using 4-byte size increments, and print the size of the current message. Change-Id: I76358323e79cfc3d0e9c979c716b7a552f3b8e3b --- gbproxy/GBProxy_Tests.ttcn | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn index 2120fa75b..2797a2ca9 100644 --- a/gbproxy/GBProxy_Tests.ttcn +++ b/gbproxy/GBProxy_Tests.ttcn @@ -40,6 +40,9 @@ import from GSM_RR_Types all; /* mcc_mnc is 24.008 10.5.5.15 encoded. 262 42 */ const BcdMccMnc c_mcc_mnc := '262F42'H; +/* 48.016 section 6.1.4.2: The default maximum information field size of 1600 octets shall be supported on the Gb interface */ +const integer max_fr_info_size := 1600; + modulepar { /* IP/port on which we run our internal GSUP/HLR emulation */ NSConfigurations mp_nsconfig_sgsn := { @@ -754,12 +757,13 @@ private function f_TC_ul_unitdata(charstring id) runs on BSSGP_ConnHdlr { var BssgpBvcConfig bvcc := g_pars.pcu[ran_idx].cfg.bvc[0]; var integer i; - for (i := 0; i < 1024; i := i+1) { + for (i := 0; i < max_fr_info_size-4; i := i+4) { var octetstring payload := f_rnd_octstring(i); var template (value) PDU_BSSGP pdu_tx := ts_BSSGP_UL_UD(g_pars.tlli, bvcc.cell_id, payload); /* we cannot use pdu_tx as there are some subtle differences in the length field :/ */ var template (present) PDU_BSSGP pdu_rx := tr_BSSGP_UL_UD(g_pars.tlli, bvcc.cell_id, payload); + log("UL-UNITDATA(payload_size=", i); f_pcu2sgsn(pdu_tx, pdu_rx); } setverdict(pass); @@ -781,7 +785,7 @@ testcase TC_ul_unitdata() runs on test_CT private function f_TC_dl_unitdata(charstring id) runs on BSSGP_ConnHdlr { var integer i; - for (i := 0; i < 1024; i := i+1) { + for (i := 0; i < max_fr_info_size-4; i := i+4) { var octetstring payload := f_rnd_octstring(i); var template (value) PDU_BSSGP pdu_tx := ts_BSSGP_DL_UD(g_pars.tlli, payload, omit, ts_BSSGP_IMSI(g_pars.imsi)); @@ -789,6 +793,7 @@ private function f_TC_dl_unitdata(charstring id) runs on BSSGP_ConnHdlr { var template (present) PDU_BSSGP pdu_rx := tr_BSSGP_DL_UD(g_pars.tlli, payload, tr_BSSGP_IMSI(g_pars.imsi)); + log("DL-UNITDATA(payload_size=", i); f_sgsn2pcu(pdu_tx, pdu_rx); } setverdict(pass);