diff options
Diffstat (limited to 'openbsc/tests/gbproxy/gbproxy_test.c')
-rw-r--r-- | openbsc/tests/gbproxy/gbproxy_test.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/openbsc/tests/gbproxy/gbproxy_test.c b/openbsc/tests/gbproxy/gbproxy_test.c index 8f339b9cd..6fd2e5546 100644 --- a/openbsc/tests/gbproxy/gbproxy_test.c +++ b/openbsc/tests/gbproxy/gbproxy_test.c @@ -137,8 +137,16 @@ static int dump_peers(FILE *stream, int indent, time_t now, fprintf(stream, "/%08x", tlli_info->sgsn_tlli.assigned); } - rc = fprintf(stream, ", IMSI %s, AGE %d\n", - mi_buf, (int)age); + fprintf(stream, ", IMSI %s, AGE %d", + mi_buf, (int)age); + + if (tlli_info->imsi_acq_pending) + fprintf(stream, ", IMSI acquisition in progress"); + + if (!llist_empty(&tlli_info->stored_msgs)) + fprintf(stream, ", stored messages"); + + rc = fprintf(stream, "\n"); if (rc < 0) return rc; } @@ -1659,6 +1667,7 @@ static void test_gbproxy_imsi_acquisition() gbcfg.core_apn = talloc_zero_size(NULL, 100); gbcfg.core_apn_size = gprs_str_to_apn(gbcfg.core_apn, 100, "foo.bar"); gbcfg.patch_ptmsi = 1; + gbcfg.acquire_imsi = 1; gbcfg.bss_ptmsi_state = 0; gbcfg.sgsn_tlli_state = 1; @@ -1693,6 +1702,13 @@ static void test_gbproxy_imsi_acquisition() dump_peers(stdout, 0, 0, &gbcfg); + send_llc_ul_ui(nsi, "IDENT RESPONSE", &bss_peer[0], 0x1002, + foreign_bss_tlli, &rai_bss, cell_id, + GPRS_SAPI_GMM, bss_nu++, + dtap_identity_resp, sizeof(dtap_identity_resp)); + + dump_peers(stdout, 0, 0, &gbcfg); + send_llc_dl_ui(nsi, "IDENT REQUEST", &sgsn_peer, 0x1002, random_sgsn_tlli, 0, NULL, 0, GPRS_SAPI_GMM, sgsn_nu++, |