lynxis lazus has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38922?usp=email )
Change subject: SGSN: Remove mm context triplets
......................................................................
SGSN: Remove mm context triplets
Only triplets which hasn't been used should be included.
The MME will only request and sent back a single set of tuples.
There shouldn't any left overs.
Change-Id: I60a3331396cb9905ec9a4df9b1e65a3291a51058
---
M sgsn/SGSN_Tests.ttcn
1 file changed, 0 insertions(+), 10 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, approved
diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index c854b72..c6c2c0a 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -3068,16 +3068,6 @@
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);
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38922?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I60a3331396cb9905ec9a4df9b1e65a3291a51058
Gerrit-Change-Number: 38922
Gerrit-PatchSet: 6
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
lynxis lazus has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38402?usp=email )
(
2 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: SGSN: f_TC_hlr_location_cancel_request_withdraw: drop incorrect Update Location response
......................................................................
SGSN: f_TC_hlr_location_cancel_request_withdraw: drop incorrect Update Location response
This PDU was a Copy/Paste mistake and never been expected or used. The SGSN ignored
this message.
Change-Id: Ib8265416c650b0983d7e85786b334f84191331b2
---
M sgsn/SGSN_Tests.ttcn
1 file changed, 0 insertions(+), 1 deletion(-)
Approvals:
fixeria: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 1bb8576..713c8f1 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -1591,7 +1591,6 @@
/* HLR: cancel the location request */
GSUP.send(ts_GSUP_CL_REQ(g_pars.imsi, OSMO_GSUP_CANCEL_TYPE_WITHDRAW));
GSUP.receive(tr_GSUP_CL_RES(g_pars.imsi));
- GSUP.send(ts_GSUP_UL_RES(g_pars.imsi));
/* MS: receive a Detach Request */
BSSGP[0].receive(tr_GMM_DET_REQ_MT(c_GMM_DTT_MT_IMSI_DETACH, ?, ?));
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38402?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ib8265416c650b0983d7e85786b334f84191331b2
Gerrit-Change-Number: 38402
Gerrit-PatchSet: 12
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
lynxis lazus has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38403?usp=email )
(
2 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: SGSN: f_TC_paging_ps: call f_gmm_attach() direct
......................................................................
SGSN: f_TC_paging_ps: call f_gmm_attach() direct
Instead of using the TC function, call f_gmm_attach() direct.
Also set explicit the verdict at the end.
Change-Id: I68c75f84b01a0cd673ffd8c19ab5f0a8517c5738
---
M sgsn/SGSN_Tests.ttcn
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
pespin: Looks good to me, but someone else must approve
Jenkins Builder: Verified
laforge: Looks good to me, approved
fixeria: Looks good to me, but someone else must approve
diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 713c8f1..d663ddd 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -2636,7 +2636,7 @@
var PdpActPars apars := valueof(t_PdpActPars(mp_ggsn_ip));
/* first perform regular attach */
- f_TC_attach(id);
+ f_gmm_attach(false, false);
/* then activate PDP context */
f_pdp_ctx_act(apars);
/* then transceive a downlink PDU */
@@ -2651,7 +2651,7 @@
/* FIXME: simulate paging response */
/* FIXME: verify PDU actually arrives only after paging response was successful */
-
+ setverdict(pass);
}
testcase TC_paging_ps() runs on test_CT {
var BSSGP_ConnHdlr vc_conn;
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38403?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I68c75f84b01a0cd673ffd8c19ab5f0a8517c5738
Gerrit-Change-Number: 38403
Gerrit-PatchSet: 12
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
lynxis lazus has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38414?usp=email )
(
7 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: SGSN: fix encoding of IMEISV in Auth and Ciphering Response
......................................................................
SGSN: fix encoding of IMEISV in Auth and Ciphering Response
According to 24.008 the IMEISV field is exact 11 bytes long and
must contain a IMEI + SV which is exact 16 digits long, not 15.
Change-Id: I79dd79840de58f450c1a05e704fd9bd831455716
---
M sgsn/BSSGP_ConnHdlr.ttcn
1 file changed, 3 insertions(+), 3 deletions(-)
Approvals:
pespin: Looks good to me, but someone else must approve
fixeria: Looks good to me, but someone else must approve
daniel: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/sgsn/BSSGP_ConnHdlr.ttcn b/sgsn/BSSGP_ConnHdlr.ttcn
index 40cb6b6..1b2e5a0 100644
--- a/sgsn/BSSGP_ConnHdlr.ttcn
+++ b/sgsn/BSSGP_ConnHdlr.ttcn
@@ -354,9 +354,9 @@
l3_mo := valueof(auth_ciph_resp);
if (ispresent(l3_mt.msgs.gprs_mm.authenticationAndCipheringRequest.imeisvRequest) and
- l3_mt.msgs.gprs_mm.authenticationAndCipheringRequest.imeisvRequest.valueField == '001'B) {
+ l3_mt.msgs.gprs_mm.authenticationAndCipheringRequest.imeisvRequest.valueField == '001'B) {
l3_mo.msgs.gprs_mm.authenticationAndCipheringResponse.imeisv :=
- valueof(ts_MI_IMEISV_TLV(g_pars.imei & '0'H));
+ valueof(ts_MI_IMEISV_TLV(g_pars.imei & '00'H));
}
f_send_l3(l3_mo, ran_index);
}
@@ -448,7 +448,7 @@
if (ispresent(l3_mt.msgs.gprs_mm.authenticationAndCipheringRequest.imeisvRequest) and
l3_mt.msgs.gprs_mm.authenticationAndCipheringRequest.imeisvRequest.valueField == '001'B) {
l3_mo.msgs.gprs_mm.authenticationAndCipheringResponse.imeisv :=
- valueof(ts_MI_IMEISV_TLV(g_pars.imei & '0'H));
+ valueof(ts_MI_IMEISV_TLV(g_pars.imei & '00'H));
}
f_send_l3(l3_mo, ran_index);
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38414?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I79dd79840de58f450c1a05e704fd9bd831455716
Gerrit-Change-Number: 38414
Gerrit-PatchSet: 11
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
lynxis lazus has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38416?usp=email )
(
1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: SGSN: TC_attach_pdp_act_pmm_idle: use correct Service Request type
......................................................................
SGSN: TC_attach_pdp_act_pmm_idle: use correct Service Request type
When the UE requests data service, it must use the data service request type.
Change-Id: I9301e7a37d96c3f93e77f7618d6c13dfa1fbe46b
---
M sgsn/SGSN_Tests_Iu.ttcn
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
laforge: Looks good to me, but someone else must approve
fixeria: Looks good to me, but someone else must approve
Jenkins Builder: Verified
pespin: Looks good to me, approved
diff --git a/sgsn/SGSN_Tests_Iu.ttcn b/sgsn/SGSN_Tests_Iu.ttcn
index 400b717..53a1080 100644
--- a/sgsn/SGSN_Tests_Iu.ttcn
+++ b/sgsn/SGSN_Tests_Iu.ttcn
@@ -258,7 +258,7 @@
/* Now UE tries to send new data after a while of being IDLE.
* SGSN recreates the Iu ctx and recovers the Direct Tunnel RNC<->GGSN: */
- f_service_request(apars, pdp_status := '2000'O /*NSAPI=5*/, ran_index := 3);
+ f_service_request(apars, service_type := SERVICE_TYPE_Data, pdp_status := '2000'O /*NSAPI=5*/, ran_index := 3);
as_ranap_rab_ass_req(apars);
as_ggsn_gtp_ctx_upd_req(apars, exp_dir_tun := true, ran_index := 3);
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38416?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I9301e7a37d96c3f93e77f7618d6c13dfa1fbe46b
Gerrit-Change-Number: 38416
Gerrit-PatchSet: 11
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
lynxis lazus has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38397?usp=email )
Change subject: SGSN: BSSGP_ConnHdlr: GMM Service Request: handle PMM IDLE UE correct
......................................................................
SGSN: BSSGP_ConnHdlr: GMM Service Request: handle PMM IDLE UE correct
24.008: 4.7.13.3: explicitly mention the completion of the low layer security to be an implicit
Security Command Accept if the UE is in PMM Idle.
Extend the as_service_request() to handle both cases when UE is in PMM-IDLE as well in
PMM-CONNECTED.
Change-Id: I29237997e414aea80f254247da54f909410a4b36
---
M sgsn/BSSGP_ConnHdlr.ttcn
1 file changed, 30 insertions(+), 6 deletions(-)
Approvals:
pespin: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/sgsn/BSSGP_ConnHdlr.ttcn b/sgsn/BSSGP_ConnHdlr.ttcn
index 2a434aa..82788f5 100644
--- a/sgsn/BSSGP_ConnHdlr.ttcn
+++ b/sgsn/BSSGP_ConnHdlr.ttcn
@@ -618,24 +618,48 @@
}
}
-/* Iu only */
-altstep as_service_request(integer ran_index := 0) runs on BSSGP_ConnHdlr {
+/* Iu only
+ *
+ * Handle a service request for a UE in PMM_IDLE or PMM_CONNECTED depending on exp_service_acc
+ * Depending on the PMM state:
+ * a) PMM_IDLE: The network will do a SecurityModeCommand on Iu, which the UE will treat as an implicit Service Accept
+ * b) PMM_CONNECTED: The Iu connection is already secured, do an explicit Service Accept
+ *
+ * NOTE: The old osmo-sgsn will always respond with a ServiceAccept even when the spec is clear this is not needed.
+ */
+altstep as_service_request(boolean exp_service_acc := true, integer ran_index := 0) runs on BSSGP_ConnHdlr {
var PDU_DTAP_PS_MT mt;
- [] BSSAP.receive(tr_PDU_DTAP_PS_MT(tr_GMM_SERVICE_ACC)) -> value mt {
+ [exp_service_acc] BSSAP.receive(tr_PDU_DTAP_PS_MT(tr_GMM_SERVICE_ACC)) -> value mt {
setverdict(pass);
}
+ [not exp_service_acc] BSSAP.receive(tr_PDU_DTAP_PS_MT(tr_GMM_SERVICE_ACC)) -> value mt {
+ setverdict(fail, "Unexpected Service Accept");
+ mtc.stop;
+ }
[] BSSAP.receive(tr_PDU_DTAP_PS_MT(tr_GMM_SERVICE_REJ)) {
setverdict(fail, "Unexpected Service Reject");
mtc.stop;
}
+ /* 24.008 4.7.13.3: a SecurityModeCommand is an implicit Service Accept if UE was in PMM-IDLE */
[] BSSAP.receive(tr_RANAP_SecurityModeCmd(uia_algs := ?,
uia_key := oct2bit(g_pars.vec.ik),
key_sts := ?)) {
var IntegrityProtectionAlgorithm uia_chosen := 0; /* 0 = standard_UMTS_integrity_algorithm_UIA1 */
BSSAP.send(ts_RANAP_SecurityModeComplete(uia_chosen));
- BSSAP.receive(tr_RANAP_CommonId(imsi_hex2oct(g_pars.imsi)))
- repeat;
+ if (not exp_service_acc) {
+ /* Because we stop processing early, we need to consume the CommonID */
+ BSSAP.receive(tr_RANAP_CommonId(imsi_hex2oct(g_pars.imsi)));
+ setverdict(pass);
+ } else {
+ /* This repeat would be wrong if you follow the spec correct. Because:
+ * a) the UE is in PMM Idle and in this case the exp_service_acc would be true
+ * b) the UE is in PMM Connected and in this case the Iu Connection should be already secure and this would fail.
+ * The old osmo-sgsn is doing for UE in PMM Idle both a Security Command and a Service Accept, after the VLR change, the
+ * osmo-sgsn will follow the spec correct.
+ */
+ repeat;
+ }
}
}
@@ -671,7 +695,7 @@
}
alt {
- [] as_service_request(ran_index) { setverdict(pass); }
+ [] as_service_request(exp_service_acc := true, ran_index := ran_index) { setverdict(pass); }
[] BSSAP.receive { repeat; }
[] T.timeout {
Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38397?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I29237997e414aea80f254247da54f909410a4b36
Gerrit-Change-Number: 38397
Gerrit-PatchSet: 8
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>