aboutsummaryrefslogtreecommitdiffstats
path: root/tests/msc_vlr/msc_vlr_test_gsm_authen.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-04-01 20:55:54 +0200
committerHarald Welte <laforge@gnumonks.org>2018-04-11 21:39:44 +0000
commit4068ab278b66af7010c3acc73a7bb87bf651fc46 (patch)
tree096c6e858639e74703f272762dcead6df7c8df4b /tests/msc_vlr/msc_vlr_test_gsm_authen.c
parente3d3dc6ea218a07161eeb80ae864a96bef2d8e61 (diff)
properly receive BSSMAP Clear Complete and Iu Release Complete
When sending a BSSMAP Clear or Iu Release, do not immediately discard the conn, but wait until a BSSMAP Clear Complete / Iu Release Complete has been received. Hence we will no longer show in the log that an incoming Release/Clear Complete belongs to an unknown subscriber, but will still be around to properly log the release. Related: OS#3122 Change-Id: Ie4c6aaba3866d6e5b98004e8870a215e8cf8ffc1
Diffstat (limited to 'tests/msc_vlr/msc_vlr_test_gsm_authen.c')
-rw-r--r--tests/msc_vlr/msc_vlr_test_gsm_authen.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/msc_vlr/msc_vlr_test_gsm_authen.c b/tests/msc_vlr/msc_vlr_test_gsm_authen.c
index 517630667..a863d9018 100644
--- a/tests/msc_vlr/msc_vlr_test_gsm_authen.c
+++ b/tests/msc_vlr/msc_vlr_test_gsm_authen.c
@@ -91,6 +91,7 @@ static void test_gsm_authen()
btw("LU was successful, and the conn has already been closed");
VERBOSE_ASSERT(lu_result_sent, == RES_ACCEPT, "%d");
+ bss_sends_clear_complete();
EXPECT_CONN_COUNT(0);
BTW("after a while, a new conn sends a CM Service Request. VLR responds with Auth Req, 2nd auth vector");
@@ -121,6 +122,7 @@ static void test_gsm_authen()
VERBOSE_ASSERT(bssap_clear_sent, == true, "%d");
btw("all requests serviced, conn has been released");
+ bss_sends_clear_complete();
EXPECT_CONN_COUNT(0);
BTW("an SMS is sent, MS is paged");
@@ -203,6 +205,7 @@ static void test_gsm_authen()
VERBOSE_ASSERT(bssap_clear_sent, == true, "%d");
btw("SMS is done, conn is gone");
+ bss_sends_clear_complete();
EXPECT_CONN_COUNT(0);
BTW("subscriber detaches");
@@ -210,6 +213,7 @@ static void test_gsm_authen()
ms_sends_msg("050130089910070000006402");
VERBOSE_ASSERT(bssap_clear_sent, == true, "%d");
+ bss_sends_clear_complete();
EXPECT_CONN_COUNT(0);
clear_vlr();
comment_end();
@@ -300,6 +304,7 @@ static void test_gsm_authen_tmsi()
VERBOSE_ASSERT(bssap_clear_sent, == true, "%d");
btw("LU was successful, and the conn has already been closed");
+ bss_sends_clear_complete();
EXPECT_CONN_COUNT(0);
btw("Subscriber has the new TMSI");
@@ -338,6 +343,7 @@ static void test_gsm_authen_tmsi()
VERBOSE_ASSERT(bssap_clear_sent, == true, "%d");
btw("all requests serviced, conn has been released");
+ bss_sends_clear_complete();
EXPECT_CONN_COUNT(0);
BTW("an SMS is sent, MS is paged");
@@ -420,6 +426,7 @@ static void test_gsm_authen_tmsi()
VERBOSE_ASSERT(bssap_clear_sent, == true, "%d");
btw("SMS is done, conn is gone");
+ bss_sends_clear_complete();
EXPECT_CONN_COUNT(0);
/* TODO: when the subscriber detaches, the vlr_subscr gets
@@ -429,6 +436,7 @@ static void test_gsm_authen_tmsi()
expect_bssap_clear();
ms_sends_msg("050130" "05f4" "03020100");
VERBOSE_ASSERT(bssap_clear_sent, == true, "%d");
+ bss_sends_clear_complete();
EXPECT_CONN_COUNT(0);
*/
@@ -476,6 +484,7 @@ static void test_gsm_authen_tmsi()
VERBOSE_ASSERT(bssap_clear_sent, == true, "%d");
btw("LU was successful, and the conn has already been closed");
+ bss_sends_clear_complete();
EXPECT_CONN_COUNT(0);
btw("subscriber has the new TMSI");
@@ -491,6 +500,7 @@ static void test_gsm_authen_tmsi()
ms_sends_msg("050130" "05f4" "07060504");
VERBOSE_ASSERT(bssap_clear_sent, == true, "%d");
+ bss_sends_clear_complete();
EXPECT_CONN_COUNT(0);
clear_vlr();
comment_end();
@@ -576,6 +586,7 @@ static void test_gsm_authen_imei()
btw("LU was successful, and the conn has already been closed");
VERBOSE_ASSERT(lu_result_sent, == RES_ACCEPT, "%d");
+ bss_sends_clear_complete();
EXPECT_CONN_COUNT(0);
btw("Subscriber has the IMEI");
@@ -589,6 +600,7 @@ static void test_gsm_authen_imei()
ms_sends_msg("050130089910070000006402");
VERBOSE_ASSERT(bssap_clear_sent, == true, "%d");
+ bss_sends_clear_complete();
EXPECT_CONN_COUNT(0);
clear_vlr();
comment_end();
@@ -693,6 +705,7 @@ static void test_gsm_authen_tmsi_imei()
VERBOSE_ASSERT(bssap_clear_sent, == true, "%d");
btw("LU was successful, and the conn has already been closed");
+ bss_sends_clear_complete();
EXPECT_CONN_COUNT(0);
btw("Subscriber has the IMEI and TMSI");
@@ -707,6 +720,7 @@ static void test_gsm_authen_tmsi_imei()
ms_sends_msg("050130" "05f4" "03020100");
VERBOSE_ASSERT(bssap_clear_sent, == true, "%d");
+ bss_sends_clear_complete();
EXPECT_CONN_COUNT(0);
clear_vlr();
comment_end();
@@ -793,6 +807,7 @@ static void test_gsm_milenage_authen()
btw("LU was successful, and the conn has already been closed");
VERBOSE_ASSERT(lu_result_sent, == RES_ACCEPT, "%d");
+ bss_sends_clear_complete();
EXPECT_CONN_COUNT(0);
BTW("after a while, a new conn sends a CM Service Request. VLR responds with Auth Req, 2nd auth vector");
@@ -826,6 +841,7 @@ static void test_gsm_milenage_authen()
VERBOSE_ASSERT(bssap_clear_sent, == true, "%d");
btw("all requests serviced, conn has been released");
+ bss_sends_clear_complete();
EXPECT_CONN_COUNT(0);
BTW("an SMS is sent, MS is paged");
@@ -911,6 +927,7 @@ static void test_gsm_milenage_authen()
VERBOSE_ASSERT(bssap_clear_sent, == true, "%d");
btw("SMS is done, conn is gone");
+ bss_sends_clear_complete();
EXPECT_CONN_COUNT(0);
BTW("subscriber detaches");
@@ -919,6 +936,7 @@ static void test_gsm_milenage_authen()
"089910070000106005" /* IMSI */);
VERBOSE_ASSERT(bssap_clear_sent, == true, "%d");
+ bss_sends_clear_complete();
EXPECT_CONN_COUNT(0);
clear_vlr();
comment_end();
@@ -979,6 +997,7 @@ static void test_wrong_sres_length()
ms_sends_msg("05542d8b2c");
VERBOSE_ASSERT(lu_result_sent, == RES_REJECT, "%d");
+ bss_sends_clear_complete();
EXPECT_CONN_COUNT(0);
clear_vlr();
comment_end();