library: fix Repeated Page Info IE in PacketPagingReq
Change-Id: I39e8e3991cc248602460b7f162a0b57c2925315f
Related: OS#4838
diff --git a/library/RLCMAC_CSN1_Types.ttcn b/library/RLCMAC_CSN1_Types.ttcn
index cc1ae22..5ef7c44 100644
--- a/library/RLCMAC_CSN1_Types.ttcn
+++ b/library/RLCMAC_CSN1_Types.ttcn
@@ -416,18 +416,22 @@
} with {
variant "TAG(ps, presence = '0'B; cs, presence = '1'B)"
};
+ type record RepeatedPageInfoItem {
+ BIT1 presence,
+ PageInfo item
+ } with { variant "PRESENCE(presence = '1'B)" };
+ type record of RepeatedPageInfoItem RepeatedPageInfo;
type record PacketPagingReq {
PageMode page_mode,
BIT1 persistence_levels_present,
PersistenceLevels persistence_levels optional,
BIT1 nln_present,
uint2_t nln optional,
- BIT1 repeated_pageinfo_present,
- PageInfo repeated_pageinfo optional
+ RepeatedPageInfo repeated_pageinfo optional,
+ BIT1 repeated_pageinfo_term ('0'B)
} with {
variant (persistence_levels) "PRESENCE(persistence_levels_present = '1'B)"
variant (nln) "PRESENCE(nln_present = '1'B)"
- variant (repeated_pageinfo) "PRESENCE(repeated_pageinfo_present = '1'B)"
};
/* 12.26 Extension Bits IE */
diff --git a/library/RLCMAC_Templates.ttcn b/library/RLCMAC_Templates.ttcn
index 5bdc17d..edf6516 100644
--- a/library/RLCMAC_Templates.ttcn
+++ b/library/RLCMAC_Templates.ttcn
@@ -642,8 +642,8 @@
persistence_levels := *,
nln_present := ?,
nln := *,
- repeated_pageinfo_present := ?,
- repeated_pageinfo := *
+ repeated_pageinfo := *,
+ repeated_pageinfo_term := '0'B
}
}
}
diff --git a/pcu/GPRS_Components.ttcn b/pcu/GPRS_Components.ttcn
index e6406b7..3778b2f 100644
--- a/pcu/GPRS_Components.ttcn
+++ b/pcu/GPRS_Components.ttcn
@@ -917,11 +917,25 @@
function f_pkt_paging_match_tmsi(in PacketPagingReq req, template GsmTmsi tmsi)
runs on MS_BTS_IFACE_CT {
- if (not match(req.repeated_pageinfo.cs.tmsi, tmsi)) {
- setverdict(fail, "Mobile Identity (TMSI/P-TMSI) mismatch: ",
- "expected: ", tmsi, "got: ", req.repeated_pageinfo.cs.tmsi);
+ if (not ispresent(req.repeated_pageinfo)) {
+ setverdict(fail, "Packet Paging Request without MIs?!?");
f_shutdown(__BFILE__, __LINE__);
}
+
+ for (var integer i := 0; i < lengthof(req.repeated_pageinfo); i := i + 1) {
+ var PageInfo info := req.repeated_pageinfo[i].item;
+ if (not ischosen(info.cs))
+ { continue; }
+
+ if (match(info.cs.tmsi, tmsi)) {
+ setverdict(pass);
+ return;
+ }
+ }
+
+ setverdict(fail, "Mobile Identity (TMSI/P-TMSI) ", tmsi,
+ " is not present in ", req.repeated_pageinfo);
+ f_shutdown(__BFILE__, __LINE__);
}
}
diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index df075bc..411890c 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -1702,7 +1702,8 @@
private function f_pkt_paging_match_imsi(in PacketPagingReq req, hexstring imsi)
runs on RAW_PCU_Test_CT {
- var MobileIdentityLV_Paging mi_lv := req.repeated_pageinfo.cs.mobile_identity;
+ var PageInfo info := req.repeated_pageinfo[0].item;
+ var MobileIdentityLV_Paging mi_lv := info.cs.mobile_identity;
var MobileIdentityV mi := dec_MobileIdentityV(mi_lv.mobile_id);
if (mi_lv.len != 8) { /* 8 octets: type of ID (3 bits) + even/odd flag (1 bit) + 15 BCD-encoded digits (60 bits) */