From e5e64c12466bbcb63ff436f7b5731af25008e7ef Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Tue, 3 Nov 2020 17:36:30 +0100 Subject: [PATCH] pcu: Implement check for expected (M)CS in received data block Change-Id: Ibdc63f6b695c08e4ddf5894c22767d07acf21311 --- pcu/GPRS_Components.ttcn | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pcu/GPRS_Components.ttcn b/pcu/GPRS_Components.ttcn index f9697a1ad..234d9102c 100644 --- a/pcu/GPRS_Components.ttcn +++ b/pcu/GPRS_Components.ttcn @@ -902,7 +902,10 @@ runs on MS_BTS_IFACE_CT { f_shutdown(__BFILE__, __LINE__); } - /* TODO: check exp_cs */ + if (not match(data_block.cs, exp_cs)) { + setverdict(fail, "Failed to match ", data_block.cs, " vs exp ", exp_cs); + f_shutdown(__BFILE__, __LINE__); + } } /* This function does what could probably be done with templates */ @@ -934,8 +937,10 @@ runs on MS_BTS_IFACE_CT { f_shutdown(__BFILE__, __LINE__); } - /* TODO: Check exp_cs. In the case of EGPRS, first check mac_hdr.header_type and then decode CPS = exp_cs based on mac_hdr.header_type. - See wireshark's egprs_Header_type1_coding_puncturing_scheme_to_mcs. */ + if (not match(data_block.mcs, exp_cs)) { + setverdict(fail, "Failed to match ", data_block.mcs, " vs exp ", exp_cs); + f_shutdown(__BFILE__, __LINE__); + } } /* High level (task specific) helper for receiving and matching GPRS/EGPRS data blocks */