sgsn: TC_sgsn_context_req_in: match MM Context & GSN Address IEs
Change-Id: Ie68794c309e548279381d044a3e34dcdf405084f
Related: SYS#6603, OS#6294
diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 9029a9e..67e815b 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -3757,7 +3757,22 @@
var template (present) GTPC_PDUs ctx_rsp;
ctx_rsp := tr_SGSNContextRespPDU(cause := GTP_CAUSE_REQUEST_ACCEPTED,
imsi := g_pars.imsi);
- /* TODO: match MM/PDP Context, GSN Address */
+
+ /* SGSN Address for Control Plane */
+ var octetstring sgsn_addr := f_inet_addr(mp_sgsn_gtp_ip);
+ ctx_rsp.sgsn_ContextResponse.sgsn_addr_controlPlane := tr_GsnAddr(sgsn_addr);
+
+ /* Match MM Context */
+ if (ispresent(g_pars.vec)) {
+ /* XXX: this is only valid for GERAN */
+ var octetstring triplet := g_pars.vec.rand & g_pars.vec.sres & g_pars.vec.kc;
+ ctx_rsp.sgsn_ContextResponse.mm_Context := tr_MM_ContextGSM(kc := g_pars.vec.kc,
+ triplet := triplet);
+ /* TODO: 7.5.4 "The IMEISV shall, if available, be included in the MM Context".
+ * See also 3GPP TS 29.060, section 7.7.28 and Table 47A */
+ }
+
+ /* TODO: match PDP Context */
T.start(2.0);
alt {