summaryrefslogtreecommitdiffstats
path: root/sgsn
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2019-04-23 23:18:23 +0200
committerHarald Welte <laforge@gnumonks.org>2019-04-25 20:06:15 +0000
commit645a151f6946578e9532f62bf48b3ddea462f354 (patch)
treeee7114986f8586ebcaafc88acd15cf8b33b29dcb /sgsn
parenta05b80792266c3e74b9386c2e02a6a05aa09a845 (diff)
sgsn: Add test cases to verify SABM handling on LLGMM + LL5
As OsmoSGSN doesn't implement ABM, the correct resposne to any SABM is DM. RelateD: OS#3953 Change-Id: Ib0d371a3356d6cb481b794945476ab40f5e0f02a
Diffstat (limited to 'sgsn')
-rw-r--r--sgsn/SGSN_Tests.ttcn36
1 files changed, 36 insertions, 0 deletions
diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 78bee58..889a16f 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -2174,6 +2174,40 @@ testcase TC_llc_null() runs on test_CT {
vc_conn.done;
}
+/* Send LLC SABM to see if the SGSN rejects it properly with DM */
+private function f_TC_llc_sabm_dm_llgmm(charstring id) runs on BSSGP_ConnHdlr {
+ f_gmm_attach(false, false);
+ f_sleep(1.0);
+ f_send_llc(ts_LLC_SABM({}, '1'B, c_LLC_SAPI_LLGMM, LLC_CR_UL_CMD));
+ BSSGP[0].receive(tr_BD_LLC(tr_LLC_DM(?, c_LLC_SAPI_LLGMM, LLC_CR_DL_RSP)));
+ setverdict(pass);
+}
+testcase TC_llc_sabm_dm_llgmm() runs on test_CT {
+ var BSSGP_ConnHdlr vc_conn;
+ f_init();
+ f_sleep(1.0);
+ vc_conn := f_start_handler(refers(f_TC_llc_sabm_dm_llgmm), testcasename(), g_gb, 42);
+ vc_conn.done;
+}
+
+/* Send LLC SABM to see if the SGSN rejects it properly with DM */
+private function f_TC_llc_sabm_dm_ll5(charstring id) runs on BSSGP_ConnHdlr {
+ f_gmm_attach(false, false);
+ f_sleep(1.0);
+ f_send_llc(ts_LLC_SABM({}, '1'B, c_LLC_SAPI_LL5, LLC_CR_UL_CMD));
+ BSSGP[0].receive(tr_BD_LLC(tr_LLC_DM(?, c_LLC_SAPI_LL5, LLC_CR_DL_RSP)));
+ setverdict(pass);
+}
+testcase TC_llc_sabm_dm_ll5() runs on test_CT {
+ var BSSGP_ConnHdlr vc_conn;
+ f_init();
+ f_sleep(1.0);
+ vc_conn := f_start_handler(refers(f_TC_llc_sabm_dm_ll5), testcasename(), g_gb, 43);
+ vc_conn.done;
+}
+
+
+
control {
execute( TC_attach() );
execute( TC_attach_mnc3() );
@@ -2220,6 +2254,8 @@ control {
execute( TC_attach_gmm_attach_req_while_gmm_attach() );
execute( TC_llc_null() );
+ execute( TC_llc_sabm_dm_llgmm() );
+ execute( TC_llc_sabm_dm_ll5() );
}