lynxis lazus has uploaded this change for review.

View Change

SGSN: TC_attach_gmm_attach_req_while_gmm_attach: fix test case

The SGSN has changed the behavior:
- removed auth-policy - not supported anymore
- require authentication

Change-Id: I026499844940d4c3d82b0fbd61be636c6ca348e6
---
M sgsn/BSSGP_ConnHdlr.ttcn
M sgsn/SGSN_Tests.ttcn
2 files changed, 18 insertions(+), 17 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/54/39254/1
diff --git a/sgsn/BSSGP_ConnHdlr.ttcn b/sgsn/BSSGP_ConnHdlr.ttcn
index 1af9181..12819b7 100644
--- a/sgsn/BSSGP_ConnHdlr.ttcn
+++ b/sgsn/BSSGP_ConnHdlr.ttcn
@@ -531,6 +531,10 @@
/* T3302, T3319, T3323, T3312_ext, T3324 */
}

+function f_random_ptmsi(OCT1 suffix := '00'O) return OCT4 {
+ return 'C0'O & f_rnd_octstring(2) & suffix;
+}
+
function f_random_RAI(HEX0_3n mcc := '262'H, HEX0_3n mnc := '42'H) return RoutingAreaIdentificationV {
return f_RAI(mcc, mnc, f_rnd_octstring(2), f_rnd_octstring(1));
}
diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index a39e346..f8b9213 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -2024,6 +2024,9 @@
var RoutingAreaIdentificationV rand_rai := f_random_RAI();
var PDU_L3_SGSN_MS l3_mt;

+ g_pars.vec := f_gen_auth_vec_3g();
+ g_pars.p_tmsi := f_random_ptmsi(suffix := '01'O);
+
f_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), rand_rai, true, false, omit, omit));

alt {
@@ -2034,30 +2037,23 @@
[] BSSGP[0].receive(tr_GMM_ID_REQ('001'B)) {
mi := valueof(ts_MI_IMSI_LV(g_pars.imsi));
f_send_l3(ts_GMM_ID_RESP(mi));
+ f_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), rand_rai, true, false, omit, omit));
repeat;
}
[] BSSGP[0].receive(tr_GMM_ID_REQ('010'B)) {
/* send out a second GMM_Attach Request.
* If the SGSN follows the rules, this 2nd ATTACH REQ should be ignored, because
* of the same content */
- f_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), rand_rai, true, false, omit, omit));
mi := valueof(ts_MI_IMEI_LV(g_pars.imei));
- f_send_l3(ts_GMM_ID_RESP(mi));
+ repeat;
}
+ [] as_gmm_auth(umts_aka_challenge := true, expect_sai := true) {};
}
f_sleep(1.0);

/* we've sent already a IMEI answer, we should NOT asked again for IMEI */
alt {
- [] BSSGP[0].receive(tr_GMM_ID_REQ('001'B)) {
- mi := valueof(ts_MI_IMSI_LV(g_pars.imsi));
- f_send_l3(ts_GMM_ID_RESP(mi));
- repeat;
- }
- [] BSSGP[0].receive(tr_GMM_ID_REQ('010'B)) {
- setverdict(fail, "Unexpected GMM ID REQ (IMEI).");
- mtc.stop;
- }
+ [] as_gmm_gsup_lu_isd() { repeat; };
[] BSSGP[0].receive(tr_GMM_ATTACH_REJECT(?)) {
setverdict(fail, "Unexpected GMM ATTACH REJECT");
mtc.stop;
@@ -2073,19 +2069,20 @@

testcase TC_attach_gmm_attach_req_while_gmm_attach() runs on test_CT {
/* Testing if the SGSN ignore Attach Request with the exact same content */
- /* MS -> SGSN: Attach Request IMSI
- * MS <- SGSN: Identity Request IMSI (optional)
- * MS -> SGSN: Identity Response IMSI (optional)
- * MS <- SGSN: Identity Request IMEI
+ /* MS -> SGSN: Attach Request TMSI
+ * MS <- SGSN: Identity Request IMSI
+ * MS -> SGSN: Identity Response IMSI
* MS -> SGSN: Attach Request (2nd)
- * MS <- SGSN: Identity Response IMEI
+ * SGS -> HLR: SAI Request
+ * SGS <- HLR: SAI Response
+ * MS <- SGSN: Identity Request IMEI
+ * MS -> SGSN: Identity Response IMEI
* MS <- SGSN: Attach Accept
* MS -> SGSN: Attach Complete
*/
var BSSGP_ConnHdlr vc_conn;
f_init();
f_sleep(1.0);
- f_vty_config(SGSNVTY, "sgsn", "auth-policy accept-all");
vc_conn := f_start_handler(refers(f_TC_attach_gmm_attach_req_while_gmm_attach), testcasename(), g_gb, 39);
vc_conn.done;
f_cleanup();

To view, visit change 39254. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I026499844940d4c3d82b0fbd61be636c6ca348e6
Gerrit-Change-Number: 39254
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis@fe80.eu>