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>
lynxis lazus has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38399?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: f_TC_attach_timeout_after_pdp_act: allow authentication
......................................................................
SGSN: f_TC_attach_timeout_after_pdp_act: allow authentication
While testing, allow the SGSN to authenticate the UE.
The new VLR code will authenticate the UE, while
the old code doesn't.
Change-Id: I11c628ecebbe7c4c1b2c28e63133a33cfc171e12
---
M sgsn/SGSN_Tests.ttcn
1 file changed, 2 insertions(+), 1 deletion(-)
Approvals:
pespin: Looks good to me, but someone else must approve
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 0f5da29..116c03d 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -604,7 +604,7 @@
f_TC_attach(id);
f_pdp_ctx_act(apars);
- /* Now, try another GPRS attach procedure. Note that osmo-sgsn does not require
+ /* Now, try another GPRS attach procedure. Note that older osmo-sgsn skip a required
* authentication for the second GMM ATTACH REQUEST, so we expect GSUP UPDATE
* LOCATION REQUEST and optionally a GMM IDENTITY REQUEST (IMEI). */
attach_req := ts_GMM_ATTACH_REQ(f_mi_get_lv(), rai, false, false, omit, omit);
@@ -612,6 +612,7 @@
T.start(1.0);
alt {
+ [] as_gmm_auth(ran_index := ran_index) { repeat; };
[] as_gmm_gsup_lu_isd();
[] as_mm_identity(ran_index);
[] as_xid(apars, ran_index);
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38399?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: I11c628ecebbe7c4c1b2c28e63133a33cfc171e12
Gerrit-Change-Number: 38399
Gerrit-PatchSet: 11
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
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/+/38400?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_attach_rau: do a periodic RA update instead of RA change
......................................................................
SGSN: f_TC_attach_rau: do a periodic RA update instead of RA change
After an attach, the periodic RA would be the correct.
Change-Id: Ic33687c55915d883b6d9a9a0d640a11588e1d1a0
---
M sgsn/SGSN_Tests.ttcn
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
fixeria: Looks good to me, but someone else must approve
Jenkins Builder: Verified
laforge: Looks good to me, approved
pespin: Looks good to me, but someone else must approve
diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 116c03d..aca2979 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -904,9 +904,9 @@
/* first perform regular attach */
f_TC_attach(id);
- f_routing_area_update(g_pars.ra);
-
+ f_routing_area_update(g_pars.ra, GPRS_UPD_T_PERIODIC, Tval := 10.0);
}
+
testcase TC_attach_rau() runs on test_CT {
var BSSGP_ConnHdlr vc_conn;
f_init();
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38400?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: Ic33687c55915d883b6d9a9a0d640a11588e1d1a0
Gerrit-Change-Number: 38400
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/+/38401?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: TC_attach_auth_id_timeout: set TMSI to provoke a ID Request
......................................................................
SGSN: TC_attach_auth_id_timeout: set TMSI to provoke a ID Request
This test case simulates a MS which ignores Identity Requests. To ensure
the SGSN will ask for the IMSI, do an Attach Request with id TMSI.
Later this ID Request (type IMSI) will be ignored and the test case
expect a Attach Reject.
Change-Id: I5a860582aa57ebc073e4c33f3f2f8884e360edef
---
M sgsn/SGSN_Tests.ttcn
1 file changed, 3 insertions(+), 0 deletions(-)
Approvals:
fixeria: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index aca2979..1bb8576 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -661,6 +661,9 @@
private function f_TC_attach_auth_id_timeout(charstring id) runs on BSSGP_ConnHdlr {
var RoutingAreaIdentificationV old_ra := f_random_RAI();
+ /* Attach via P-TMSI to force Id Request (IMSI) which times out */
+ g_pars.p_tmsi := 'c000004a'O;
+
f_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit));
alt {
[] BSSGP[0].receive(tr_GMM_ID_REQ(?)) {
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38401?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: I5a860582aa57ebc073e4c33f3f2f8884e360edef
Gerrit-Change-Number: 38401
Gerrit-PatchSet: 12
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-CC: pespin <pespin(a)sysmocom.de>