summaryrefslogtreecommitdiffstats
path: root/sgsn
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-02-16 22:12:59 +0100
committerHarald Welte <laforge@gnumonks.org>2018-02-18 10:23:54 +0100
commit76dee09c7f0843662da3e3f4012c697041b54f84 (patch)
tree398834043811808c3e58c5f394119eef44ad92f0 /sgsn
parentbd194720ad3ad21fec8d514925064d8c9f991621 (diff)
sgsn: Add TC_attach_accept_all for "auth-policy accept-all"
Diffstat (limited to 'sgsn')
-rw-r--r--sgsn/SGSN_Tests.ttcn32
1 files changed, 32 insertions, 0 deletions
diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 3abff8c..134193c 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -270,7 +270,11 @@ function f_gmm_auth () runs on BSSGP_ConnHdlr {
valueof(ts_MI_IMEISV_TLV(g_pars.imei & '0'H));
}
BSSGP.send(l3_mo);
+ } else {
+ /* wait for identity procedure */
+ f_sleep(1.0);
}
+
deactivate(di);
}
@@ -433,6 +437,33 @@ testcase TC_attach_combined() runs on test_CT {
vc_conn.done;
}
+/* Attempt of GPRS ATTACH in 'accept all' mode */
+private function f_TC_attach_accept_all(charstring id) runs on BSSGP_ConnHdlr {
+ var MobileIdentityLV mi;
+ var RoutingAreaIdentificationV old_ra := f_random_RAI();
+
+ g_pars.net.expect_auth := false;
+
+ if (ispresent(g_pars.p_tmsi)) {
+ mi := valueof(ts_MI_TMSI_LV(g_pars.p_tmsi));
+ } else {
+ mi := valueof(ts_MI_IMSI_LV(g_pars.imsi));
+ }
+
+ BSSGP.send(ts_GMM_ATTACH_REQ(mi, old_ra, false, false, omit, omit));
+ f_gmm_auth();
+ BSSGP.receive(tr_BD_L3_MT(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?)));
+ BSSGP.send(ts_GMM_ATTACH_COMPL);
+ setverdict(pass);
+}
+testcase TC_attach_accept_all() runs on test_CT {
+ 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_accept_all), testcasename(), g_gb[0], 6);
+ vc_conn.done;
+}
control {
@@ -441,6 +472,7 @@ control {
execute( TC_attach_auth_sai_timeout() );
execute( TC_attach_gsup_lu_timeout() );
execute( TC_attach_combined() );
+ execute( TC_attach_accept_all() );
}