<p>Harald Welte <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/10987">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">A5/n Ciph: request Classmark Update if missing<br><br>When the VLR requests a Ciphering Mode with vlr_ops.set_ciph_mode(), and if we<br>need a ciph algo flag from a Classmark information that is not yet known<br>(usually CM 2 during LU), send a BSSMAP Classmark Request to get it.<br><br>To manage the intermission of the Classmark Request, add<br>- msc_classmark_request_then_cipher_mode_cmd(),<br>- state SUBSCR_CONN_S_WAIT_CLASSMARK_UPDATE,<br>- event SUBSCR_CONN_E_CLASSMARK_UPDATE.<br><br>From state AUTH_CIPH, switch to state WAIT_CLASSMARK_UPDATE. Once the BSSMAP<br>Classmark Response, is received, switch back to SUBSCR_CONN_S_AUTH_CIPH and<br>re-initiate Ciphering Mode.<br><br>To be able to re-enter the Ciphering Mode algo decision, factor it out into<br>msc_geran_set_cipher_mode().<br><br>Rationale:<br><br>In the following commit, essentially we stopped supporting A5/3 ciphering:<br><br>commit 71330720b6efdda2fcfd3e9c0cb45f89e32e5670<br>"MSC: Intersect configured A5 algorithms with MS-supported ones"<br>Change-Id: Id124923ee52a357cb7d3e04d33f585214774f3a3<br><br>A5/3 was no longer supported because from that commit on, we strictly checked<br>the MS-supported ciphers, but we did not have Classmark 2 available during<br>Location Updating.<br><br>This patch changes that: when Classmark 2 is missing, actively request it by a<br>BSSMAP Classmark Request; continue Ciphering only after the Response. Always<br>request missing Classmark, even if a lesser cipher were configured available.<br><br>If the Classmark Update response fails to come in, cause an attach failure.<br>Instead, we could attempt to use a lesser cipher that is also enabled. That is<br>left as a future feature, should that become relevant. I think it's unlikely.<br><br>Technically, we could now end up requesting a Classmark Updating both during LU<br>(vlr_lu_fsm) and CM Service/Paging Response (proc_arq_fsm), but in practice the<br>only time we lack a Classmark is: during Location Updating with A5/3 enabled.<br>A5/1 support is indicated in CM1 which is always available, and A5/3 support is<br>indicated in CM2, which is always available during CM Service Request as well<br>as Paging Response. So this patch has practical relevance only for Location<br>Updating. For networks that permit only A5/3, this patch fixes Location<br>Updating. For networks that support A5/3 and A5/1, so far we always used A5/1<br>during LU, and after this patch we request CM2 and likely use A5/3 instead.<br><br>In msc_vlr_test_gsm_ciph, verify that requesting Classmark 2 for A5/3 works<br>during LU. Also verify that the lack of a Classmark Response results in attach<br>failure.<br><br>In msc_vlr_test_gsm_ciph, a hacky unit test fakes a situation where a CM2 is<br>missing during proc_arq_fsm and proves that that code path works, even though<br>the practical relevance is currently zero. It would only become interesting if<br>ciphering algorithms A5/4 and higher became relevant, because support of those<br>would be indicated in Classmark 3, which would always require a Classmark<br>Request.<br><br>Related: OS#3043<br>Depends: I4a2e1d3923e33912579c4180aa1ff8e8f5abb7e7 (libosmocore)<br>Change-Id: I73c7cb6a86624695bd9c0f59abb72e2fdc655131<br>---<br>M include/osmocom/msc/a_iface.h<br>M include/osmocom/msc/gsm_data.h<br>M include/osmocom/msc/osmo_msc.h<br>M src/libmsc/a_iface.c<br>M src/libmsc/gsm_04_08.c<br>M src/libmsc/osmo_msc.c<br>M src/libmsc/subscr_conn.c<br>M tests/msc_vlr/Makefile.am<br>M tests/msc_vlr/msc_vlr_test_gsm_ciph.c<br>M tests/msc_vlr/msc_vlr_test_gsm_ciph.err<br>M tests/msc_vlr/msc_vlr_test_ms_timeout.c<br>M tests/msc_vlr/msc_vlr_test_ms_timeout.err<br>M tests/msc_vlr/msc_vlr_tests.c<br>M tests/msc_vlr/msc_vlr_tests.h<br>14 files changed, 1,757 insertions(+), 75 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/include/osmocom/msc/a_iface.h b/include/osmocom/msc/a_iface.h</span><br><span>index 217011d..9a758d3 100644</span><br><span>--- a/include/osmocom/msc/a_iface.h</span><br><span>+++ b/include/osmocom/msc/a_iface.h</span><br><span>@@ -78,6 +78,8 @@</span><br><span> /* Send clear command via A-interface */</span><br><span> int a_iface_tx_clear_cmd(struct gsm_subscriber_connection *conn);</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+int a_iface_tx_classmark_request(const struct gsm_subscriber_connection *conn);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> /* Clear all subscriber connections on a specified BSC</span><br><span>  * (Helper function for a_iface_bssap.c) */</span><br><span> void a_clear_all(struct osmo_sccp_user *scu, const struct osmo_sccp_addr *bsc_addr);</span><br><span>diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h</span><br><span>index ffe3afc..70ac934 100644</span><br><span>--- a/include/osmocom/msc/gsm_data.h</span><br><span>+++ b/include/osmocom/msc/gsm_data.h</span><br><span>@@ -130,6 +130,13 @@</span><br><span>  uint16_t lac;</span><br><span>        struct gsm_encr encr;</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+     /* "Temporary" storage for the case the VLR asked for Cipher Mode Command, but the MSC still</span><br><span style="color: hsl(120, 100%, 40%);">+         * wants to request a Classmark Update first. */</span><br><span style="color: hsl(120, 100%, 40%);">+      struct {</span><br><span style="color: hsl(120, 100%, 40%);">+              bool umts_aka;</span><br><span style="color: hsl(120, 100%, 40%);">+                bool retrieve_imeisv;</span><br><span style="color: hsl(120, 100%, 40%);">+ } geran_set_cipher_mode;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>   /* N(SD) expected in the received frame, per flow (TS 24.007 11.2.3.2.3.2.2) */</span><br><span>      uint8_t n_sd_next[4];</span><br><span> </span><br><span>diff --git a/include/osmocom/msc/osmo_msc.h b/include/osmocom/msc/osmo_msc.h</span><br><span>index 7b3702a..3ffb65c 100644</span><br><span>--- a/include/osmocom/msc/osmo_msc.h</span><br><span>+++ b/include/osmocom/msc/osmo_msc.h</span><br><span>@@ -16,6 +16,8 @@</span><br><span>   SUBSCR_CONN_E_INVALID = 0,</span><br><span>   /* Accepted the initial Complete Layer 3 (starting to evaluate Authentication and Ciphering) */</span><br><span>      SUBSCR_CONN_E_COMPLETE_LAYER_3,</span><br><span style="color: hsl(120, 100%, 40%);">+       /* Received Classmark Update, typically neede for Ciphering Mode Command */</span><br><span style="color: hsl(120, 100%, 40%);">+   SUBSCR_CONN_E_CLASSMARK_UPDATE,</span><br><span>      /* LU or Process Access FSM has determined that this conn is good */</span><br><span>         SUBSCR_CONN_E_ACCEPTED,</span><br><span>      /* received first reply from MS in "real" CC, SMS, USSD communication */</span><br><span>@@ -33,6 +35,7 @@</span><br><span> enum subscr_conn_fsm_state {</span><br><span>       SUBSCR_CONN_S_NEW,</span><br><span>   SUBSCR_CONN_S_AUTH_CIPH,</span><br><span style="color: hsl(120, 100%, 40%);">+      SUBSCR_CONN_S_WAIT_CLASSMARK_UPDATE,</span><br><span>         SUBSCR_CONN_S_ACCEPTED,</span><br><span>      SUBSCR_CONN_S_COMMUNICATING,</span><br><span>         SUBSCR_CONN_S_RELEASING,</span><br><span>@@ -62,6 +65,9 @@</span><br><span>                  struct msgb *msg, uint16_t chosen_channel);</span><br><span> void msc_dtap(struct gsm_subscriber_connection *conn, uint8_t link_id,</span><br><span>             struct msgb *msg);</span><br><span style="color: hsl(120, 100%, 40%);">+int msc_classmark_request_then_cipher_mode_cmd(struct gsm_subscriber_connection *conn, bool umts_aka,</span><br><span style="color: hsl(120, 100%, 40%);">+                                              bool retrieve_imeisv);</span><br><span style="color: hsl(120, 100%, 40%);">+int msc_geran_set_cipher_mode(struct gsm_subscriber_connection *conn, bool umts_aka, bool retrieve_imeisv);</span><br><span> void msc_cipher_mode_compl(struct gsm_subscriber_connection *conn,</span><br><span>                        struct msgb *msg, uint8_t alg_id);</span><br><span> void msc_rx_sec_mode_compl(struct gsm_subscriber_connection *conn);</span><br><span>diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c</span><br><span>index 75fa438..bd9b890 100644</span><br><span>--- a/src/libmsc/a_iface.c</span><br><span>+++ b/src/libmsc/a_iface.c</span><br><span>@@ -422,6 +422,16 @@</span><br><span>     return osmo_sccp_tx_data_msg(conn->a.scu, conn->a.conn_id, msg);</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+int a_iface_tx_classmark_request(const struct gsm_subscriber_connection *conn)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+    struct msgb *msg;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   LOGPCONN(conn, LOGL_INFO, "Tx BSSMAP CLASSMARK REQUEST to BSC\n");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        msg = gsm0808_create_classmark_request();</span><br><span style="color: hsl(120, 100%, 40%);">+     return osmo_sccp_tx_data_msg(conn->a.scu, conn->a.conn_id, msg);</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> /* Callback function: Close all open connections */</span><br><span> static void a_reset_cb(const void *priv)</span><br><span> {</span><br><span>diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c</span><br><span>index b942a03..564e90b 100644</span><br><span>--- a/src/libmsc/gsm_04_08.c</span><br><span>+++ b/src/libmsc/gsm_04_08.c</span><br><span>@@ -119,13 +119,16 @@</span><br><span>     return classmark2_is_r99(cm->classmark2, cm->classmark2_len);</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-/* Determine if the given CLASSMARK (1/2/3) value permits a given A5/n cipher */</span><br><span style="color: hsl(0, 100%, 40%);">-static bool classmark_supports_a5(const struct gsm_classmark *cm, uint8_t a5)</span><br><span style="color: hsl(120, 100%, 40%);">+/* Determine if the given CLASSMARK (1/2/3) value permits a given A5/n cipher.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Return 1 when the given A5/n is permitted, 0 when not, and negative if the respective MS CLASSMARK is</span><br><span style="color: hsl(120, 100%, 40%);">+ * not known, where the negative number indicates the classmark type: -2 means Classmark 2 is not</span><br><span style="color: hsl(120, 100%, 40%);">+ * available. */</span><br><span style="color: hsl(120, 100%, 40%);">+static int classmark_supports_a5(const struct gsm_classmark *cm, uint8_t a5)</span><br><span> {</span><br><span>  switch (a5) {</span><br><span>        case 0:</span><br><span>              /* all phones must implement A5/0, see 3GPP TS 43.020 4.9 */</span><br><span style="color: hsl(0, 100%, 40%);">-            return true;</span><br><span style="color: hsl(120, 100%, 40%);">+          return 1;</span><br><span>    case 1:</span><br><span>              /* 3GPP TS 43.020 4.9 requires A5/1 to be suppored by all phones and actually states:</span><br><span>                 * "The network shall not provide service to an MS which indicates that it does not</span><br><span>@@ -134,25 +137,24 @@</span><br><span>             /* See 3GPP TS 24.008 10.5.1.7 */</span><br><span>            if (!cm->classmark1_set) {</span><br><span>                        DEBUGP(DMSC, "CLASSMARK 1 unknown, assuming MS supports A5/1\n");</span><br><span style="color: hsl(0, 100%, 40%);">-                     return true;</span><br><span style="color: hsl(120, 100%, 40%);">+                  return -1;</span><br><span>           } else {</span><br><span>                     if (cm->classmark1.a5_1)</span><br><span style="color: hsl(0, 100%, 40%);">-                             return false;   /* Inverted logic for this bit! */</span><br><span style="color: hsl(120, 100%, 40%);">+                            return 0;       /* Inverted logic for this bit! */</span><br><span>                   else</span><br><span style="color: hsl(0, 100%, 40%);">-                            return true;</span><br><span style="color: hsl(120, 100%, 40%);">+                          return 1;</span><br><span>            }</span><br><span>            break;</span><br><span>       case 2:</span><br><span>      case 3:</span><br><span>              /* See 3GPP TS 24.008 10.5.1.6 */</span><br><span>            if (cm->classmark2_len < 3) {</span><br><span style="color: hsl(0, 100%, 40%);">-                     DEBUGP(DMSC, "CLASSMARK 2 unknown, assuming MS doesn't support A5/%u\n", a5);</span><br><span style="color: hsl(0, 100%, 40%);">-                     return false;</span><br><span style="color: hsl(120, 100%, 40%);">+                 return -2;</span><br><span>           } else {</span><br><span>                     if (cm->classmark2[2] & (1 << (a5-2)))</span><br><span style="color: hsl(0, 100%, 40%);">-                             return true;</span><br><span style="color: hsl(120, 100%, 40%);">+                          return 1;</span><br><span>                    else</span><br><span style="color: hsl(0, 100%, 40%);">-                            return false;</span><br><span style="color: hsl(120, 100%, 40%);">+                         return 0;</span><br><span>            }</span><br><span>            break;</span><br><span>       case 4:</span><br><span>@@ -161,13 +163,12 @@</span><br><span>      case 7:</span><br><span>              /* See 3GPP TS 24.008 10.5.1.7 */</span><br><span>            if (cm->classmark3_len < 1) {</span><br><span style="color: hsl(0, 100%, 40%);">-                     DEBUGP(DMSC, "CLASSMARK 3 unknown, assuming MS doesn't support A5/%u\n", a5);</span><br><span style="color: hsl(0, 100%, 40%);">-                     return false;</span><br><span style="color: hsl(120, 100%, 40%);">+                 return -3;</span><br><span>           } else {</span><br><span>                     if (cm->classmark3[0] & (1 << (a5-4)))</span><br><span style="color: hsl(0, 100%, 40%);">-                             return true;</span><br><span style="color: hsl(120, 100%, 40%);">+                          return 1;</span><br><span>                    else</span><br><span style="color: hsl(0, 100%, 40%);">-                            return false;</span><br><span style="color: hsl(120, 100%, 40%);">+                         return 0;</span><br><span>            }</span><br><span>            break;</span><br><span>       default:</span><br><span>@@ -1592,6 +1593,78 @@</span><br><span> osmo_static_assert(sizeof(((struct gsm0808_encrypt_info*)0)->key) >= sizeof(((struct osmo_auth_vector*)0)->kc),</span><br><span>                   gsm0808_encrypt_info_key_fits_osmo_auth_vec_kc);</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+int msc_geran_set_cipher_mode(struct gsm_subscriber_connection *conn, bool umts_aka, bool retrieve_imeisv)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+        struct gsm_network *net = conn->network;</span><br><span style="color: hsl(120, 100%, 40%);">+   struct gsm0808_encrypt_info ei;</span><br><span style="color: hsl(120, 100%, 40%);">+       int i, j = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ int request_classmark = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+    int request_classmark_for_a5_n = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+   struct gsm_auth_tuple *tuple = conn->vsub->last_tuple;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        if (!conn || !conn->vsub || !conn->vsub->last_tuple) {</span><br><span style="color: hsl(120, 100%, 40%);">+               /* This should really never happen, because we checked this in msc_vlr_set_ciph_mode()</span><br><span style="color: hsl(120, 100%, 40%);">+                 * already. */</span><br><span style="color: hsl(120, 100%, 40%);">+                LOGP(DMM, LOGL_ERROR, "Internal error: missing state during Ciphering Mode Command\n");</span><br><span style="color: hsl(120, 100%, 40%);">+             return -EINVAL;</span><br><span style="color: hsl(120, 100%, 40%);">+       }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   for (i = 0; i < 8; i++) {</span><br><span style="color: hsl(120, 100%, 40%);">+          int supported;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+              /* A5/n permitted by osmo-msc.cfg? */</span><br><span style="color: hsl(120, 100%, 40%);">+         if (!(net->a5_encryption_mask & (1 << i)))</span><br><span style="color: hsl(120, 100%, 40%);">+                       continue;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+           /* A5/n supported by MS? */</span><br><span style="color: hsl(120, 100%, 40%);">+           supported = classmark_supports_a5(&conn->vsub->classmark, i);</span><br><span style="color: hsl(120, 100%, 40%);">+               if (supported == 1) {</span><br><span style="color: hsl(120, 100%, 40%);">+                 ei.perm_algo[j++] = vlr_ciph_to_gsm0808_alg_id(i);</span><br><span style="color: hsl(120, 100%, 40%);">+                    /* A higher A5/n is supported, so no need to request a Classmark</span><br><span style="color: hsl(120, 100%, 40%);">+                       * for support of a lesser A5/n. */</span><br><span style="color: hsl(120, 100%, 40%);">+                   request_classmark = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+                } else if (supported < 0) {</span><br><span style="color: hsl(120, 100%, 40%);">+                        request_classmark = -supported;</span><br><span style="color: hsl(120, 100%, 40%);">+                       request_classmark_for_a5_n = i;</span><br><span style="color: hsl(120, 100%, 40%);">+               }</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+     ei.perm_algo_len = j;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       if (request_classmark) {</span><br><span style="color: hsl(120, 100%, 40%);">+              /* The highest A5/n as from osmo-msc.cfg might be available, but we are</span><br><span style="color: hsl(120, 100%, 40%);">+                * still missing the Classmark information for that from the MS. First</span><br><span style="color: hsl(120, 100%, 40%);">+                 * ask for that. */</span><br><span style="color: hsl(120, 100%, 40%);">+           LOGP(DMM, LOGL_DEBUG, "%s: to determine whether A5/%d is supported,"</span><br><span style="color: hsl(120, 100%, 40%);">+                     " first ask for a Classmark Update to obtain Classmark %d\n",</span><br><span style="color: hsl(120, 100%, 40%);">+               vlr_subscr_name(conn->vsub), request_classmark_for_a5_n,</span><br><span style="color: hsl(120, 100%, 40%);">+                   request_classmark);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+            return msc_classmark_request_then_cipher_mode_cmd(conn, umts_aka, retrieve_imeisv);</span><br><span style="color: hsl(120, 100%, 40%);">+   }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   if (ei.perm_algo_len == 0) {</span><br><span style="color: hsl(120, 100%, 40%);">+          LOGP(DMM, LOGL_ERROR, "%s: cannot start ciphering, no intersection "</span><br><span style="color: hsl(120, 100%, 40%);">+                     "between MSC-configured and MS-supported A5 algorithms\n",</span><br><span style="color: hsl(120, 100%, 40%);">+                  vlr_subscr_name(conn->vsub));</span><br><span style="color: hsl(120, 100%, 40%);">+         return -ENOTSUP;</span><br><span style="color: hsl(120, 100%, 40%);">+      }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   DEBUGP(DMM, "-> CIPHER MODE COMMAND %s\n", vlr_subscr_name(conn->vsub));</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+    tuple = conn->vsub->last_tuple;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       /* In case of UMTS AKA, the Kc for ciphering must be derived from the 3G auth</span><br><span style="color: hsl(120, 100%, 40%);">+  * tokens.  tuple->vec.kc was calculated from the GSM algorithm and is not</span><br><span style="color: hsl(120, 100%, 40%);">+  * necessarily a match for the UMTS AKA tokens. */</span><br><span style="color: hsl(120, 100%, 40%);">+    if (umts_aka)</span><br><span style="color: hsl(120, 100%, 40%);">+         osmo_auth_c3(ei.key, tuple->vec.ck, tuple->vec.ik);</span><br><span style="color: hsl(120, 100%, 40%);">+     else</span><br><span style="color: hsl(120, 100%, 40%);">+          memcpy(ei.key, tuple->vec.kc, sizeof(tuple->vec.kc));</span><br><span style="color: hsl(120, 100%, 40%);">+   ei.key_len = sizeof(tuple->vec.kc);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      return a_iface_tx_cipher_mode(conn, &ei, retrieve_imeisv);</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> /* VLR asks us to start using ciphering.</span><br><span>  * (Keep non-static to allow regression testing on this function.) */</span><br><span> int msc_vlr_set_ciph_mode(void *msc_conn_ref,</span><br><span>@@ -1620,38 +1693,7 @@</span><br><span> </span><br><span>       switch (conn->via_ran) {</span><br><span>  case RAN_GERAN_A:</span><br><span style="color: hsl(0, 100%, 40%);">-               DEBUGP(DMM, "-> CIPHER MODE COMMAND %s\n",</span><br><span style="color: hsl(0, 100%, 40%);">-                vlr_subscr_name(conn->vsub));</span><br><span style="color: hsl(0, 100%, 40%);">-         {</span><br><span style="color: hsl(0, 100%, 40%);">-                       struct gsm_network *net = conn->network;</span><br><span style="color: hsl(0, 100%, 40%);">-                     struct gsm0808_encrypt_info ei;</span><br><span style="color: hsl(0, 100%, 40%);">-                 int i, j = 0;</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-                   for (i = 0; i < 8; i++) {</span><br><span style="color: hsl(0, 100%, 40%);">-                            if (net->a5_encryption_mask & (1 << i) &&</span><br><span style="color: hsl(0, 100%, 40%);">-                              classmark_supports_a5(&conn->vsub->classmark, i))</span><br><span style="color: hsl(0, 100%, 40%);">-                                 ei.perm_algo[j++] = vlr_ciph_to_gsm0808_alg_id(i);</span><br><span style="color: hsl(0, 100%, 40%);">-                      }</span><br><span style="color: hsl(0, 100%, 40%);">-                       ei.perm_algo_len = j;</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-                   if (ei.perm_algo_len == 0) {</span><br><span style="color: hsl(0, 100%, 40%);">-                            LOGP(DMM, LOGL_ERROR, "%s: cannot start ciphering, no intersection "</span><br><span style="color: hsl(0, 100%, 40%);">-                                  "between MSC-configured and MS-supported A5 algorithms\n",</span><br><span style="color: hsl(0, 100%, 40%);">-                                    vlr_subscr_name(conn->vsub));</span><br><span style="color: hsl(0, 100%, 40%);">-                                return -ENOTSUP;</span><br><span style="color: hsl(0, 100%, 40%);">-                        }</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-                       /* In case of UMTS AKA, the Kc for ciphering must be derived from the 3G auth</span><br><span style="color: hsl(0, 100%, 40%);">-                    * tokens.  tuple->vec.kc was calculated from the GSM algorithm and is not</span><br><span style="color: hsl(0, 100%, 40%);">-                    * necessarily a match for the UMTS AKA tokens. */</span><br><span style="color: hsl(0, 100%, 40%);">-                      if (umts_aka)</span><br><span style="color: hsl(0, 100%, 40%);">-                           osmo_auth_c3(ei.key, tuple->vec.ck, tuple->vec.ik);</span><br><span style="color: hsl(0, 100%, 40%);">-                       else</span><br><span style="color: hsl(0, 100%, 40%);">-                            memcpy(ei.key, tuple->vec.kc, sizeof(tuple->vec.kc));</span><br><span style="color: hsl(0, 100%, 40%);">-                     ei.key_len = sizeof(tuple->vec.kc);</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-                  return a_iface_tx_cipher_mode(conn, &ei, retrieve_imeisv);</span><br><span style="color: hsl(0, 100%, 40%);">-          }</span><br><span style="color: hsl(120, 100%, 40%);">+             return msc_geran_set_cipher_mode(conn, umts_aka, retrieve_imeisv);</span><br><span> </span><br><span>       case RAN_UTRAN_IU:</span><br><span> #ifdef BUILD_IU</span><br><span>diff --git a/src/libmsc/osmo_msc.c b/src/libmsc/osmo_msc.c</span><br><span>index 1966043..8efa16c 100644</span><br><span>--- a/src/libmsc/osmo_msc.c</span><br><span>+++ b/src/libmsc/osmo_msc.c</span><br><span>@@ -167,6 +167,10 @@</span><br><span>                cm->classmark3_len = cm3_len;</span><br><span>             memcpy(cm->classmark3, cm3, cm3_len);</span><br><span>     }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   /* bump subscr conn FSM in case it is waiting for a Classmark Update */</span><br><span style="color: hsl(120, 100%, 40%);">+       if (conn->fi->state == SUBSCR_CONN_S_WAIT_CLASSMARK_UPDATE)</span><br><span style="color: hsl(120, 100%, 40%);">+             osmo_fsm_inst_dispatch(conn->fi, SUBSCR_CONN_E_CLASSMARK_UPDATE, NULL);</span><br><span> }</span><br><span> </span><br><span> /* Receive a CIPHERING MODE COMPLETE from BSC */</span><br><span>diff --git a/src/libmsc/subscr_conn.c b/src/libmsc/subscr_conn.c</span><br><span>index 2040e36..e6fa7e1 100644</span><br><span>--- a/src/libmsc/subscr_conn.c</span><br><span>+++ b/src/libmsc/subscr_conn.c</span><br><span>@@ -45,6 +45,7 @@</span><br><span> static const struct value_string subscr_conn_fsm_event_names[] = {</span><br><span>       OSMO_VALUE_STRING(SUBSCR_CONN_E_INVALID),</span><br><span>    OSMO_VALUE_STRING(SUBSCR_CONN_E_COMPLETE_LAYER_3),</span><br><span style="color: hsl(120, 100%, 40%);">+    OSMO_VALUE_STRING(SUBSCR_CONN_E_CLASSMARK_UPDATE),</span><br><span>   OSMO_VALUE_STRING(SUBSCR_CONN_E_ACCEPTED),</span><br><span>   OSMO_VALUE_STRING(SUBSCR_CONN_E_COMMUNICATING),</span><br><span>      OSMO_VALUE_STRING(SUBSCR_CONN_E_RELEASE_WHEN_UNUSED),</span><br><span>@@ -163,6 +164,66 @@</span><br><span>         }</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+int msc_classmark_request_then_cipher_mode_cmd(struct gsm_subscriber_connection *conn, bool umts_aka,</span><br><span style="color: hsl(120, 100%, 40%);">+                                            bool retrieve_imeisv)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+       int rc;</span><br><span style="color: hsl(120, 100%, 40%);">+       conn->geran_set_cipher_mode.umts_aka = umts_aka;</span><br><span style="color: hsl(120, 100%, 40%);">+   conn->geran_set_cipher_mode.retrieve_imeisv = retrieve_imeisv;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   rc = a_iface_tx_classmark_request(conn);</span><br><span style="color: hsl(120, 100%, 40%);">+      if (rc) {</span><br><span style="color: hsl(120, 100%, 40%);">+             LOGP(DMM, LOGL_ERROR, "%s: cannot send BSSMAP Classmark Request\n",</span><br><span style="color: hsl(120, 100%, 40%);">+              vlr_subscr_name(conn->vsub));</span><br><span style="color: hsl(120, 100%, 40%);">+         return -EIO;</span><br><span style="color: hsl(120, 100%, 40%);">+  }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   osmo_fsm_inst_state_chg(conn->fi, SUBSCR_CONN_S_WAIT_CLASSMARK_UPDATE, SUBSCR_CONN_TIMEOUT, 0);</span><br><span style="color: hsl(120, 100%, 40%);">+    return 0;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+static void subscr_conn_fsm_wait_classmark_update(struct osmo_fsm_inst *fi, uint32_t event, void *data)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+    struct gsm_subscriber_connection *conn = fi->priv;</span><br><span style="color: hsl(120, 100%, 40%);">+ switch (event) {</span><br><span style="color: hsl(120, 100%, 40%);">+      case SUBSCR_CONN_E_CLASSMARK_UPDATE:</span><br><span style="color: hsl(120, 100%, 40%);">+          /* Theoretically, this event can be used for requesting Classmark in various situations.</span><br><span style="color: hsl(120, 100%, 40%);">+               * So far though, the only time we send a Classmark Request is during Ciphering. As soon</span><br><span style="color: hsl(120, 100%, 40%);">+               * as more such situations arise, we need to add state to indicate what action should</span><br><span style="color: hsl(120, 100%, 40%);">+          * follow after a Classmark Update is received (e.g.</span><br><span style="color: hsl(120, 100%, 40%);">+           * msc_classmark_request_then_cipher_mode_cmd() sets an enum value to indicate that</span><br><span style="color: hsl(120, 100%, 40%);">+            * Ciphering should continue afterwards). But right now, it is accurate to always</span><br><span style="color: hsl(120, 100%, 40%);">+              * continue with Ciphering: */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+              /* During Ciphering, we needed Classmark information. The Classmark Update has come in,</span><br><span style="color: hsl(120, 100%, 40%);">+                * go back into the Set Ciphering Command procedure. */</span><br><span style="color: hsl(120, 100%, 40%);">+               osmo_fsm_inst_state_chg(fi, SUBSCR_CONN_S_AUTH_CIPH, SUBSCR_CONN_TIMEOUT, 0);</span><br><span style="color: hsl(120, 100%, 40%);">+         if (msc_geran_set_cipher_mode(conn, conn->geran_set_cipher_mode.umts_aka,</span><br><span style="color: hsl(120, 100%, 40%);">+                                        conn->geran_set_cipher_mode.retrieve_imeisv)) {</span><br><span style="color: hsl(120, 100%, 40%);">+                      LOGPFSML(fi, LOGL_ERROR,</span><br><span style="color: hsl(120, 100%, 40%);">+                               "Sending Cipher Mode Command failed, aborting attach\n");</span><br><span style="color: hsl(120, 100%, 40%);">+                  vlr_subscr_cancel_attach_fsm(conn->vsub, OSMO_FSM_TERM_ERROR,</span><br><span style="color: hsl(120, 100%, 40%);">+                                                   GSM48_REJECT_NETWORK_FAILURE);</span><br><span style="color: hsl(120, 100%, 40%);">+           }</span><br><span style="color: hsl(120, 100%, 40%);">+             return;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+     case SUBSCR_CONN_E_UNUSED:</span><br><span style="color: hsl(120, 100%, 40%);">+            LOGPFSML(fi, LOGL_DEBUG, "Awaiting results for Auth+Ciph, overruling event %s\n",</span><br><span style="color: hsl(120, 100%, 40%);">+                    osmo_fsm_event_name(fi->fsm, event));</span><br><span style="color: hsl(120, 100%, 40%);">+             return;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+     case SUBSCR_CONN_E_MO_CLOSE:</span><br><span style="color: hsl(120, 100%, 40%);">+  case SUBSCR_CONN_E_CN_CLOSE:</span><br><span style="color: hsl(120, 100%, 40%);">+          log_close_event(fi, event, data);</span><br><span style="color: hsl(120, 100%, 40%);">+             evaluate_acceptance_outcome(fi, false);</span><br><span style="color: hsl(120, 100%, 40%);">+               osmo_fsm_inst_state_chg(fi, SUBSCR_CONN_S_RELEASING, SUBSCR_CONN_TIMEOUT, 0);</span><br><span style="color: hsl(120, 100%, 40%);">+         return;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+     default:</span><br><span style="color: hsl(120, 100%, 40%);">+              OSMO_ASSERT(false);</span><br><span style="color: hsl(120, 100%, 40%);">+   }</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> static bool subscr_conn_fsm_has_active_transactions(struct osmo_fsm_inst *fi)</span><br><span> {</span><br><span>         struct gsm_subscriber_connection *conn = fi->priv;</span><br><span>@@ -362,10 +423,21 @@</span><br><span>                                 S(SUBSCR_CONN_E_MO_CLOSE) |</span><br><span>                                  S(SUBSCR_CONN_E_CN_CLOSE) |</span><br><span>                                  S(SUBSCR_CONN_E_UNUSED),</span><br><span style="color: hsl(0, 100%, 40%);">-               .out_state_mask = S(SUBSCR_CONN_S_ACCEPTED) |</span><br><span style="color: hsl(120, 100%, 40%);">+         .out_state_mask = S(SUBSCR_CONN_S_WAIT_CLASSMARK_UPDATE) |</span><br><span style="color: hsl(120, 100%, 40%);">+                              S(SUBSCR_CONN_S_ACCEPTED) |</span><br><span>                                  S(SUBSCR_CONN_S_RELEASING),</span><br><span>                .action = subscr_conn_fsm_auth_ciph,</span><br><span>         },</span><br><span style="color: hsl(120, 100%, 40%);">+    [SUBSCR_CONN_S_WAIT_CLASSMARK_UPDATE] = {</span><br><span style="color: hsl(120, 100%, 40%);">+             .name = OSMO_STRINGIFY(SUBSCR_CONN_S_WAIT_CLASSMARK_UPDATE),</span><br><span style="color: hsl(120, 100%, 40%);">+          .in_event_mask = S(SUBSCR_CONN_E_CLASSMARK_UPDATE) |</span><br><span style="color: hsl(120, 100%, 40%);">+                           S(SUBSCR_CONN_E_MO_CLOSE) |</span><br><span style="color: hsl(120, 100%, 40%);">+                           S(SUBSCR_CONN_E_CN_CLOSE) |</span><br><span style="color: hsl(120, 100%, 40%);">+                           S(SUBSCR_CONN_E_UNUSED),</span><br><span style="color: hsl(120, 100%, 40%);">+             .out_state_mask = S(SUBSCR_CONN_S_AUTH_CIPH) |</span><br><span style="color: hsl(120, 100%, 40%);">+                                  S(SUBSCR_CONN_S_RELEASING),</span><br><span style="color: hsl(120, 100%, 40%);">+         .action = subscr_conn_fsm_wait_classmark_update,</span><br><span style="color: hsl(120, 100%, 40%);">+      },</span><br><span>   [SUBSCR_CONN_S_ACCEPTED] = {</span><br><span>                 .name = OSMO_STRINGIFY(SUBSCR_CONN_S_ACCEPTED),</span><br><span>              /* allow everything to release for any odd behavior */</span><br><span>diff --git a/tests/msc_vlr/Makefile.am b/tests/msc_vlr/Makefile.am</span><br><span>index e6b20e6..1d1956a 100644</span><br><span>--- a/tests/msc_vlr/Makefile.am</span><br><span>+++ b/tests/msc_vlr/Makefile.am</span><br><span>@@ -35,6 +35,7 @@</span><br><span>  -Wl,--wrap=msc_mgcp_call_assignment \</span><br><span>        -Wl,--wrap=a_iface_tx_cipher_mode \</span><br><span>  -Wl,--wrap=ranap_iu_tx_sec_mode_cmd \</span><br><span style="color: hsl(120, 100%, 40%);">+ -Wl,--wrap=osmo_sccp_tx_data_msg \</span><br><span>   $(NULL)</span><br><span> </span><br><span> LDADD = \</span><br><span>diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.c b/tests/msc_vlr/msc_vlr_test_gsm_ciph.c</span><br><span>index add9f7f..4254066 100644</span><br><span>--- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.c</span><br><span>+++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.c</span><br><span>@@ -1053,8 +1053,11 @@</span><br><span>   comment_end();</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-static void test_a5_3_not_supported()</span><br><span style="color: hsl(120, 100%, 40%);">+static void test_a5_3_supported()</span><br><span> {</span><br><span style="color: hsl(120, 100%, 40%);">+  struct vlr_subscr *vsub;</span><br><span style="color: hsl(120, 100%, 40%);">+      const char *imsi = "901700000004620";</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>    comment_start();</span><br><span> </span><br><span>         /* implicit: net->authentication_required = true; */</span><br><span>@@ -1093,12 +1096,403 @@</span><br><span>   VERBOSE_ASSERT(auth_request_sent, == true, "%d");</span><br><span> </span><br><span>      BTW("MS sends Authen Response, VLR accepts and wants to send Ciphering Mode Command to MS"</span><br><span style="color: hsl(0, 100%, 40%);">-        " -- alas, no matching cipher can be found, abort and release");</span><br><span style="color: hsl(120, 100%, 40%);">+            " -- but needs Classmark 2 to determine whether A5/3 is supported");</span><br><span>   cipher_mode_cmd_sent = false;</span><br><span style="color: hsl(0, 100%, 40%);">-   expect_bssap_clear();</span><br><span>        ms_sends_msg("05542d8b2c3e");</span><br><span>      OSMO_ASSERT(!cipher_mode_cmd_sent);</span><br><span style="color: hsl(0, 100%, 40%);">-     VERBOSE_ASSERT(lu_result_sent, == RES_REJECT, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+        VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        btw("BSC sends back a BSSMAP Classmark Update, that triggers the Ciphering Mode Command in A5/3");</span><br><span style="color: hsl(120, 100%, 40%);">+  expect_cipher_mode_cmd("61855fb81fc2a800");</span><br><span style="color: hsl(120, 100%, 40%);">+ bss_sends_bssap_mgmt("541203505886130b6014042f6503b8800d2100");</span><br><span style="color: hsl(120, 100%, 40%);">+     OSMO_ASSERT(cipher_mode_cmd_sent);</span><br><span style="color: hsl(120, 100%, 40%);">+    VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        btw("MS sends Ciphering Mode Complete, VLR accepts and sends GSUP LU Req to HLR");</span><br><span style="color: hsl(120, 100%, 40%);">+  gsup_expect_tx("04010809710000004026f0");</span><br><span style="color: hsl(120, 100%, 40%);">+   ms_sends_msg("0632");</span><br><span style="color: hsl(120, 100%, 40%);">+       VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        btw("HLR sends _INSERT_DATA_REQUEST, VLR responds with _INSERT_DATA_RESULT");</span><br><span style="color: hsl(120, 100%, 40%);">+       gsup_rx("10010809710000004026f00804032443f2",</span><br><span style="color: hsl(120, 100%, 40%);">+               "12010809710000004026f0");</span><br><span style="color: hsl(120, 100%, 40%);">+  VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        btw("HLR also sends GSUP _UPDATE_LOCATION_RESULT");</span><br><span style="color: hsl(120, 100%, 40%);">+ expect_bssap_clear();</span><br><span style="color: hsl(120, 100%, 40%);">+ gsup_rx("06010809710000004026f0", NULL);</span><br><span style="color: hsl(120, 100%, 40%);">+    VERBOSE_ASSERT(bssap_clear_sent, == true, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  btw("LU was successful, and the conn has already been closed");</span><br><span style="color: hsl(120, 100%, 40%);">+     VERBOSE_ASSERT(lu_result_sent, == RES_ACCEPT, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+        bss_sends_clear_complete();</span><br><span style="color: hsl(120, 100%, 40%);">+   EXPECT_CONN_COUNT(0);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       BTW("after a while, a new conn sends a CM Service Request. VLR responds with Auth Req, 2nd auth vector");</span><br><span style="color: hsl(120, 100%, 40%);">+   cm_service_result_sent = RES_NONE;</span><br><span style="color: hsl(120, 100%, 40%);">+    auth_request_sent = false;</span><br><span style="color: hsl(120, 100%, 40%);">+    auth_request_expect_rand = "12aca96fb4ffdea5c985cbafa9b6e18b";</span><br><span style="color: hsl(120, 100%, 40%);">+      ms_sends_msg("05247803305886089910070000006402");</span><br><span style="color: hsl(120, 100%, 40%);">+   OSMO_ASSERT(g_conn);</span><br><span style="color: hsl(120, 100%, 40%);">+  OSMO_ASSERT(g_conn->fi);</span><br><span style="color: hsl(120, 100%, 40%);">+   OSMO_ASSERT(g_conn->vsub);</span><br><span style="color: hsl(120, 100%, 40%);">+ VERBOSE_ASSERT(auth_request_sent, == true, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+   VERBOSE_ASSERT(cm_service_result_sent, == RES_NONE, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        btw("needs auth, not yet accepted");</span><br><span style="color: hsl(120, 100%, 40%);">+        EXPECT_ACCEPTED(false);</span><br><span style="color: hsl(120, 100%, 40%);">+       thwart_rx_non_initial_requests();</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   btw("MS sends Authen Response, VLR accepts and requests Ciphering. We already know Classmark 3,"</span><br><span style="color: hsl(120, 100%, 40%);">+        " so no need to request Classmark Update.");</span><br><span style="color: hsl(120, 100%, 40%);">+    expect_cipher_mode_cmd("07fa7502e07e1c00");</span><br><span style="color: hsl(120, 100%, 40%);">+ ms_sends_msg("0554" "20bde240" /* 2nd vector's sres, s.a. */);</span><br><span style="color: hsl(120, 100%, 40%);">+        VERBOSE_ASSERT(cm_service_result_sent, == RES_NONE, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+  VERBOSE_ASSERT(cipher_mode_cmd_sent, == true, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      btw("needs ciph, not yet accepted");</span><br><span style="color: hsl(120, 100%, 40%);">+        EXPECT_ACCEPTED(false);</span><br><span style="color: hsl(120, 100%, 40%);">+       thwart_rx_non_initial_requests();</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   btw("MS sends Ciphering Mode Complete, VLR accepts; above Ciphering is an implicit CM Service Accept");</span><br><span style="color: hsl(120, 100%, 40%);">+     ms_sends_msg("0632");</span><br><span style="color: hsl(120, 100%, 40%);">+       VERBOSE_ASSERT(cm_service_result_sent, == RES_NONE, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        /* Release connection */</span><br><span style="color: hsl(120, 100%, 40%);">+      expect_bssap_clear(RAN_GERAN_A);</span><br><span style="color: hsl(120, 100%, 40%);">+      conn_conclude_cm_service_req(g_conn, RAN_GERAN_A);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  btw("all requests serviced, conn has been released");</span><br><span style="color: hsl(120, 100%, 40%);">+       bss_sends_clear_complete();</span><br><span style="color: hsl(120, 100%, 40%);">+   EXPECT_CONN_COUNT(0);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       BTW("an SMS is sent, MS is paged");</span><br><span style="color: hsl(120, 100%, 40%);">+ paging_expect_imsi(imsi);</span><br><span style="color: hsl(120, 100%, 40%);">+     paging_sent = false;</span><br><span style="color: hsl(120, 100%, 40%);">+  vsub = vlr_subscr_find_by_imsi(net->vlr, imsi);</span><br><span style="color: hsl(120, 100%, 40%);">+    OSMO_ASSERT(vsub);</span><br><span style="color: hsl(120, 100%, 40%);">+    VERBOSE_ASSERT(llist_count(&vsub->cs.requests), == 0, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       send_sms(vsub, vsub,</span><br><span style="color: hsl(120, 100%, 40%);">+           "Privacy in residential applications is a desirable"</span><br><span style="color: hsl(120, 100%, 40%);">+                " marketing option.");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   VERBOSE_ASSERT(llist_count(&vsub->cs.requests), == 1, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+ vlr_subscr_put(vsub);</span><br><span style="color: hsl(120, 100%, 40%);">+ vsub = NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+  VERBOSE_ASSERT(paging_sent, == true, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+ VERBOSE_ASSERT(paging_stopped, == false, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   btw("the subscriber and its pending request should remain");</span><br><span style="color: hsl(120, 100%, 40%);">+        vsub = vlr_subscr_find_by_imsi(net->vlr, imsi);</span><br><span style="color: hsl(120, 100%, 40%);">+    OSMO_ASSERT(vsub);</span><br><span style="color: hsl(120, 100%, 40%);">+    VERBOSE_ASSERT(llist_count(&vsub->cs.requests), == 1, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+ vlr_subscr_put(vsub);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       btw("MS replies with Paging Response, and VLR sends Auth Request with third key");</span><br><span style="color: hsl(120, 100%, 40%);">+  auth_request_sent = false;</span><br><span style="color: hsl(120, 100%, 40%);">+    auth_request_expect_rand = "e7c03ba7cf0e2fde82b2dc4d63077d42";</span><br><span style="color: hsl(120, 100%, 40%);">+      ms_sends_msg("06270703305882089910070000006402");</span><br><span style="color: hsl(120, 100%, 40%);">+   VERBOSE_ASSERT(auth_request_sent, == true, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ btw("needs auth, not yet accepted");</span><br><span style="color: hsl(120, 100%, 40%);">+        EXPECT_ACCEPTED(false);</span><br><span style="color: hsl(120, 100%, 40%);">+       thwart_rx_non_initial_requests();</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   btw("MS sends Authen Response, VLR accepts and requests Ciphering");</span><br><span style="color: hsl(120, 100%, 40%);">+        expect_cipher_mode_cmd("e2b234f807886400");</span><br><span style="color: hsl(120, 100%, 40%);">+ ms_sends_msg("0554" "a29514ae" /* 3rd vector's sres, s.a. */);</span><br><span style="color: hsl(120, 100%, 40%);">+        VERBOSE_ASSERT(cipher_mode_cmd_sent, == true, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      btw("needs ciph, not yet accepted");</span><br><span style="color: hsl(120, 100%, 40%);">+        EXPECT_ACCEPTED(false);</span><br><span style="color: hsl(120, 100%, 40%);">+       thwart_rx_non_initial_requests();</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   btw("MS sends Ciphering Mode Complete, VLR accepts and sends pending SMS");</span><br><span style="color: hsl(120, 100%, 40%);">+ dtap_expect_tx("09" /* SMS messages */</span><br><span style="color: hsl(120, 100%, 40%);">+                     "01" /* CP-DATA */</span><br><span style="color: hsl(120, 100%, 40%);">+                  "58" /* length */</span><br><span style="color: hsl(120, 100%, 40%);">+                   "01" /* Network to MS */</span><br><span style="color: hsl(120, 100%, 40%);">+                    "00" /* reference */</span><br><span style="color: hsl(120, 100%, 40%);">+                /* originator (gsm411_send_sms() hardcodes this weird nr) */</span><br><span style="color: hsl(120, 100%, 40%);">+                  "0791" "447758100650" /* 447785016005 */</span><br><span style="color: hsl(120, 100%, 40%);">+                  "00" /* dest */</span><br><span style="color: hsl(120, 100%, 40%);">+                     /* SMS TPDU */</span><br><span style="color: hsl(120, 100%, 40%);">+                "4c" /* len */</span><br><span style="color: hsl(120, 100%, 40%);">+                      "00" /* SMS deliver */</span><br><span style="color: hsl(120, 100%, 40%);">+                      "05802443f2" /* originating address 42342 */</span><br><span style="color: hsl(120, 100%, 40%);">+                "00" /* TP-PID */</span><br><span style="color: hsl(120, 100%, 40%);">+                   "00" /* GSM default alphabet */</span><br><span style="color: hsl(120, 100%, 40%);">+                     "071010" /* Y-M-D (from wrapped gsm340_gen_scts())*/</span><br><span style="color: hsl(120, 100%, 40%);">+                "000000" /* H-M-S */</span><br><span style="color: hsl(120, 100%, 40%);">+                "00" /* GMT+0 */</span><br><span style="color: hsl(120, 100%, 40%);">+                    "44" /* data length */</span><br><span style="color: hsl(120, 100%, 40%);">+                      "5079da1e1ee7416937485e9ea7c965373d1d6683c270383b3d0e"</span><br><span style="color: hsl(120, 100%, 40%);">+                      "d3d36ff71c949e83c22072799e9687c5ec32a81d96afcbf4b4fb"</span><br><span style="color: hsl(120, 100%, 40%);">+                      "0c7ac3e9e9b7db05");</span><br><span style="color: hsl(120, 100%, 40%);">+ ms_sends_msg("0632");</span><br><span style="color: hsl(120, 100%, 40%);">+       VERBOSE_ASSERT(dtap_tx_confirmed, == true, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+   VERBOSE_ASSERT(paging_stopped, == true, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+    btw("SMS was delivered, no requests pending for subscr");</span><br><span style="color: hsl(120, 100%, 40%);">+   vsub = vlr_subscr_find_by_imsi(net->vlr, imsi);</span><br><span style="color: hsl(120, 100%, 40%);">+    OSMO_ASSERT(vsub);</span><br><span style="color: hsl(120, 100%, 40%);">+    VERBOSE_ASSERT(llist_count(&vsub->cs.requests), == 0, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+ vlr_subscr_put(vsub);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       btw("conn is still open to wait for SMS ack dance");</span><br><span style="color: hsl(120, 100%, 40%);">+        EXPECT_CONN_COUNT(1);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       btw("MS replies with CP-ACK for received SMS");</span><br><span style="color: hsl(120, 100%, 40%);">+     ms_sends_msg("8904");</span><br><span style="color: hsl(120, 100%, 40%);">+       EXPECT_CONN_COUNT(1);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       btw("MS also sends RP-ACK, MSC in turn sends CP-ACK for that");</span><br><span style="color: hsl(120, 100%, 40%);">+     dtap_expect_tx("0904");</span><br><span style="color: hsl(120, 100%, 40%);">+     expect_bssap_clear();</span><br><span style="color: hsl(120, 100%, 40%);">+ ms_sends_msg("890106020041020000");</span><br><span style="color: hsl(120, 100%, 40%);">+ VERBOSE_ASSERT(dtap_tx_confirmed, == true, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+   VERBOSE_ASSERT(bssap_clear_sent, == true, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  btw("SMS is done, conn is gone");</span><br><span style="color: hsl(120, 100%, 40%);">+   bss_sends_clear_complete();</span><br><span style="color: hsl(120, 100%, 40%);">+   EXPECT_CONN_COUNT(0);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       BTW("subscriber detaches");</span><br><span style="color: hsl(120, 100%, 40%);">+ expect_bssap_clear();</span><br><span style="color: hsl(120, 100%, 40%);">+ ms_sends_msg("050130089910070000006402");</span><br><span style="color: hsl(120, 100%, 40%);">+   VERBOSE_ASSERT(bssap_clear_sent, == true, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  bss_sends_clear_complete();</span><br><span style="color: hsl(120, 100%, 40%);">+   EXPECT_CONN_COUNT(0);</span><br><span style="color: hsl(120, 100%, 40%);">+ clear_vlr();</span><br><span style="color: hsl(120, 100%, 40%);">+  comment_end();</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* During CM Service Request or Paging Response we already have Classmark 2 that indicates A5/3</span><br><span style="color: hsl(120, 100%, 40%);">+ * availablity. Here, in a hacky way remove the knowledge of Classmark 2 to tickle a code path where</span><br><span style="color: hsl(120, 100%, 40%);">+ * proc_arq_fsm needs a Classmark Update during Ciphering. Shouldn't happen in reality though. */</span><br><span style="color: hsl(120, 100%, 40%);">+static void test_cm_service_needs_classmark_update()</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+    struct vlr_subscr *vsub;</span><br><span style="color: hsl(120, 100%, 40%);">+      const char *imsi = "901700000004620";</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+     comment_start();</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+    /* A5/3 support is indicated in Classmark 3. By configuring A5/3, trigger the code paths that</span><br><span style="color: hsl(120, 100%, 40%);">+  * send a Classmark Request. */</span><br><span style="color: hsl(120, 100%, 40%);">+       net->a5_encryption_mask = (1 << 3); /* A5/3 */</span><br><span style="color: hsl(120, 100%, 40%);">+        /* implicit: net->authentication_required = true; */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+    btw("Location Update request causes a GSUP Send Auth Info request to HLR");</span><br><span style="color: hsl(120, 100%, 40%);">+ lu_result_sent = RES_NONE;</span><br><span style="color: hsl(120, 100%, 40%);">+    gsup_expect_tx("08010809710000004026f0");</span><br><span style="color: hsl(120, 100%, 40%);">+   ms_sends_msg("050802008168000130089910070000006402");</span><br><span style="color: hsl(120, 100%, 40%);">+       OSMO_ASSERT(gsup_tx_confirmed);</span><br><span style="color: hsl(120, 100%, 40%);">+       VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        btw("from HLR, rx _SEND_AUTH_INFO_RESULT; VLR sends Auth Req to MS");</span><br><span style="color: hsl(120, 100%, 40%);">+       /* Based on a Ki of 000102030405060708090a0b0c0d0e0f */</span><br><span style="color: hsl(120, 100%, 40%);">+       auth_request_sent = false;</span><br><span style="color: hsl(120, 100%, 40%);">+    auth_request_expect_rand = "585df1ae287f6e273dce07090d61320b";</span><br><span style="color: hsl(120, 100%, 40%);">+      auth_request_expect_autn = NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+      gsup_rx("0a"</span><br><span style="color: hsl(120, 100%, 40%);">+                /* imsi */</span><br><span style="color: hsl(120, 100%, 40%);">+            "0108" "09710000004026f0"</span><br><span style="color: hsl(120, 100%, 40%);">+         /* 5 auth vectors... */</span><br><span style="color: hsl(120, 100%, 40%);">+               /* TL    TL     rand */</span><br><span style="color: hsl(120, 100%, 40%);">+               "0322"  "2010" "585df1ae287f6e273dce07090d61320b"</span><br><span style="color: hsl(120, 100%, 40%);">+               /*       TL     sres       TL     kc */</span><br><span style="color: hsl(120, 100%, 40%);">+                       "2104" "2d8b2c3e" "2208" "61855fb81fc2a800"</span><br><span style="color: hsl(120, 100%, 40%);">+           "0322"  "2010" "12aca96fb4ffdea5c985cbafa9b6e18b"</span><br><span style="color: hsl(120, 100%, 40%);">+                       "2104" "20bde240" "2208" "07fa7502e07e1c00"</span><br><span style="color: hsl(120, 100%, 40%);">+           "0322"  "2010" "e7c03ba7cf0e2fde82b2dc4d63077d42"</span><br><span style="color: hsl(120, 100%, 40%);">+                       "2104" "a29514ae" "2208" "e2b234f807886400"</span><br><span style="color: hsl(120, 100%, 40%);">+           "0322"  "2010" "fa8f20b781b5881329d4fea26b1a3c51"</span><br><span style="color: hsl(120, 100%, 40%);">+                       "2104" "5afc8d72" "2208" "2392f14f709ae000"</span><br><span style="color: hsl(120, 100%, 40%);">+           "0322"  "2010" "0fd4cc8dbe8715d1f439e304edfd68dc"</span><br><span style="color: hsl(120, 100%, 40%);">+                       "2104" "bc8d1c5b" "2208" "da7cdd6bfe2d7000",</span><br><span style="color: hsl(120, 100%, 40%);">+          NULL);</span><br><span style="color: hsl(120, 100%, 40%);">+        VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+  VERBOSE_ASSERT(auth_request_sent, == true, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ BTW("MS sends Authen Response, VLR accepts and wants to send Ciphering Mode Command to MS"</span><br><span style="color: hsl(120, 100%, 40%);">+      " -- but needs Classmark 2 to determine whether A5/3 is supported");</span><br><span style="color: hsl(120, 100%, 40%);">+    cipher_mode_cmd_sent = false;</span><br><span style="color: hsl(120, 100%, 40%);">+ ms_sends_msg("05542d8b2c3e");</span><br><span style="color: hsl(120, 100%, 40%);">+       OSMO_ASSERT(!cipher_mode_cmd_sent);</span><br><span style="color: hsl(120, 100%, 40%);">+   VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        btw("BSC sends back a BSSMAP Classmark Update, that triggers the Ciphering Mode Command in A5/3");</span><br><span style="color: hsl(120, 100%, 40%);">+  expect_cipher_mode_cmd("61855fb81fc2a800");</span><br><span style="color: hsl(120, 100%, 40%);">+ bss_sends_bssap_mgmt("541203505886130b6014042f6503b8800d2100");</span><br><span style="color: hsl(120, 100%, 40%);">+     OSMO_ASSERT(cipher_mode_cmd_sent);</span><br><span style="color: hsl(120, 100%, 40%);">+    VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        btw("MS sends Ciphering Mode Complete, VLR accepts and sends GSUP LU Req to HLR");</span><br><span style="color: hsl(120, 100%, 40%);">+  gsup_expect_tx("04010809710000004026f0");</span><br><span style="color: hsl(120, 100%, 40%);">+   ms_sends_msg("0632");</span><br><span style="color: hsl(120, 100%, 40%);">+       VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        btw("HLR sends _INSERT_DATA_REQUEST, VLR responds with _INSERT_DATA_RESULT");</span><br><span style="color: hsl(120, 100%, 40%);">+       gsup_rx("10010809710000004026f00804032443f2",</span><br><span style="color: hsl(120, 100%, 40%);">+               "12010809710000004026f0");</span><br><span style="color: hsl(120, 100%, 40%);">+  VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        btw("HLR also sends GSUP _UPDATE_LOCATION_RESULT");</span><br><span style="color: hsl(120, 100%, 40%);">+ expect_bssap_clear();</span><br><span style="color: hsl(120, 100%, 40%);">+ gsup_rx("06010809710000004026f0", NULL);</span><br><span style="color: hsl(120, 100%, 40%);">+    VERBOSE_ASSERT(bssap_clear_sent, == true, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  btw("LU was successful, and the conn has already been closed");</span><br><span style="color: hsl(120, 100%, 40%);">+     VERBOSE_ASSERT(lu_result_sent, == RES_ACCEPT, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+        bss_sends_clear_complete();</span><br><span style="color: hsl(120, 100%, 40%);">+   EXPECT_CONN_COUNT(0);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+     BTW("after a while, a new conn sends a CM Service Request. VLR responds with Auth Req, 2nd auth vector");</span><br><span style="color: hsl(120, 100%, 40%);">+   cm_service_result_sent = RES_NONE;</span><br><span style="color: hsl(120, 100%, 40%);">+    auth_request_sent = false;</span><br><span style="color: hsl(120, 100%, 40%);">+    auth_request_expect_rand = "12aca96fb4ffdea5c985cbafa9b6e18b";</span><br><span style="color: hsl(120, 100%, 40%);">+      ms_sends_msg("05247803305886089910070000006402");</span><br><span style="color: hsl(120, 100%, 40%);">+   OSMO_ASSERT(g_conn);</span><br><span style="color: hsl(120, 100%, 40%);">+  OSMO_ASSERT(g_conn->fi);</span><br><span style="color: hsl(120, 100%, 40%);">+   OSMO_ASSERT(g_conn->vsub);</span><br><span style="color: hsl(120, 100%, 40%);">+ VERBOSE_ASSERT(auth_request_sent, == true, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+   VERBOSE_ASSERT(cm_service_result_sent, == RES_NONE, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        btw("needs auth, not yet accepted");</span><br><span style="color: hsl(120, 100%, 40%);">+        EXPECT_ACCEPTED(false);</span><br><span style="color: hsl(120, 100%, 40%);">+       thwart_rx_non_initial_requests();</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   btw("MS sends Authen Response, VLR accepts and requests Ciphering. We already know Classmark 3,"</span><br><span style="color: hsl(120, 100%, 40%);">+        " so no need to request Classmark Update.");</span><br><span style="color: hsl(120, 100%, 40%);">+    expect_cipher_mode_cmd("07fa7502e07e1c00");</span><br><span style="color: hsl(120, 100%, 40%);">+ ms_sends_msg("0554" "20bde240" /* 2nd vector's sres, s.a. */);</span><br><span style="color: hsl(120, 100%, 40%);">+        VERBOSE_ASSERT(cm_service_result_sent, == RES_NONE, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+  VERBOSE_ASSERT(cipher_mode_cmd_sent, == true, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      btw("needs ciph, not yet accepted");</span><br><span style="color: hsl(120, 100%, 40%);">+        EXPECT_ACCEPTED(false);</span><br><span style="color: hsl(120, 100%, 40%);">+       thwart_rx_non_initial_requests();</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   btw("MS sends Ciphering Mode Complete, VLR accepts; above Ciphering is an implicit CM Service Accept");</span><br><span style="color: hsl(120, 100%, 40%);">+     ms_sends_msg("0632");</span><br><span style="color: hsl(120, 100%, 40%);">+       VERBOSE_ASSERT(cm_service_result_sent, == RES_NONE, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        /* Release connection */</span><br><span style="color: hsl(120, 100%, 40%);">+      expect_bssap_clear(RAN_GERAN_A);</span><br><span style="color: hsl(120, 100%, 40%);">+      conn_conclude_cm_service_req(g_conn, RAN_GERAN_A);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  btw("all requests serviced, conn has been released");</span><br><span style="color: hsl(120, 100%, 40%);">+       bss_sends_clear_complete();</span><br><span style="color: hsl(120, 100%, 40%);">+   EXPECT_CONN_COUNT(0);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       BTW("an SMS is sent, MS is paged");</span><br><span style="color: hsl(120, 100%, 40%);">+ paging_expect_imsi(imsi);</span><br><span style="color: hsl(120, 100%, 40%);">+     paging_sent = false;</span><br><span style="color: hsl(120, 100%, 40%);">+  vsub = vlr_subscr_find_by_imsi(net->vlr, imsi);</span><br><span style="color: hsl(120, 100%, 40%);">+    OSMO_ASSERT(vsub);</span><br><span style="color: hsl(120, 100%, 40%);">+    VERBOSE_ASSERT(llist_count(&vsub->cs.requests), == 0, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       send_sms(vsub, vsub, "Privacy in residential applications is a desirable marketing option.");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+     VERBOSE_ASSERT(llist_count(&vsub->cs.requests), == 1, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+ vlr_subscr_put(vsub);</span><br><span style="color: hsl(120, 100%, 40%);">+ vsub = NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+  VERBOSE_ASSERT(paging_sent, == true, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+ VERBOSE_ASSERT(paging_stopped, == false, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   btw("the subscriber and its pending request should remain");</span><br><span style="color: hsl(120, 100%, 40%);">+        vsub = vlr_subscr_find_by_imsi(net->vlr, imsi);</span><br><span style="color: hsl(120, 100%, 40%);">+    OSMO_ASSERT(vsub);</span><br><span style="color: hsl(120, 100%, 40%);">+    VERBOSE_ASSERT(llist_count(&vsub->cs.requests), == 1, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+ vlr_subscr_put(vsub);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       btw("MS replies with Paging Response, and VLR sends Auth Request with third key");</span><br><span style="color: hsl(120, 100%, 40%);">+  auth_request_sent = false;</span><br><span style="color: hsl(120, 100%, 40%);">+    auth_request_expect_rand = "e7c03ba7cf0e2fde82b2dc4d63077d42";</span><br><span style="color: hsl(120, 100%, 40%);">+      ms_sends_msg("06270703305882089910070000006402");</span><br><span style="color: hsl(120, 100%, 40%);">+   VERBOSE_ASSERT(auth_request_sent, == true, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ BTW("Fake a situation where Classmark 2 is unknown during proc_arq_fsm");</span><br><span style="color: hsl(120, 100%, 40%);">+   vsub = vlr_subscr_find_by_imsi(net->vlr, imsi);</span><br><span style="color: hsl(120, 100%, 40%);">+    OSMO_ASSERT(vsub);</span><br><span style="color: hsl(120, 100%, 40%);">+    vsub->classmark.classmark2_len = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+        vsub->classmark.classmark3_len = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+        vlr_subscr_put(vsub);</span><br><span style="color: hsl(120, 100%, 40%);">+ </span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+    btw("MS sends Authen Response, VLR accepts and requests Ciphering");</span><br><span style="color: hsl(120, 100%, 40%);">+        btw("MS sends Authen Response, VLR accepts and requests Ciphering."</span><br><span style="color: hsl(120, 100%, 40%);">+     " Normally, we'd know Classmark 3, but this test removed it."</span><br><span style="color: hsl(120, 100%, 40%);">+           " Hence a Classmark Request is generated.");</span><br><span style="color: hsl(120, 100%, 40%);">+    cipher_mode_cmd_sent = false;</span><br><span style="color: hsl(120, 100%, 40%);">+ ms_sends_msg("0554" "a29514ae" /* 3rd vector's sres, s.a. */);</span><br><span style="color: hsl(120, 100%, 40%);">+        OSMO_ASSERT(!cipher_mode_cmd_sent);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ btw("BSC sends back a BSSMAP Classmark Update, that triggers the Ciphering Mode Command in A5/3");</span><br><span style="color: hsl(120, 100%, 40%);">+  expect_cipher_mode_cmd("e2b234f807886400");</span><br><span style="color: hsl(120, 100%, 40%);">+ bss_sends_bssap_mgmt("541203505886130b6014042f6503b8800d2100");</span><br><span style="color: hsl(120, 100%, 40%);">+     OSMO_ASSERT(cipher_mode_cmd_sent);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  btw("needs ciph, not yet accepted");</span><br><span style="color: hsl(120, 100%, 40%);">+        EXPECT_ACCEPTED(false);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+     btw("MS sends Ciphering Mode Complete, VLR accepts and sends pending SMS");</span><br><span style="color: hsl(120, 100%, 40%);">+ dtap_expect_tx("09" /* SMS messages */</span><br><span style="color: hsl(120, 100%, 40%);">+                     "01" /* CP-DATA */</span><br><span style="color: hsl(120, 100%, 40%);">+                  "58" /* length */</span><br><span style="color: hsl(120, 100%, 40%);">+                   "01" /* Network to MS */</span><br><span style="color: hsl(120, 100%, 40%);">+                    "00" /* reference */</span><br><span style="color: hsl(120, 100%, 40%);">+                /* originator (gsm411_send_sms() hardcodes this weird nr) */</span><br><span style="color: hsl(120, 100%, 40%);">+                  "0791" "447758100650" /* 447785016005 */</span><br><span style="color: hsl(120, 100%, 40%);">+                  "00" /* dest */</span><br><span style="color: hsl(120, 100%, 40%);">+                     /* SMS TPDU */</span><br><span style="color: hsl(120, 100%, 40%);">+                "4c" /* len */</span><br><span style="color: hsl(120, 100%, 40%);">+                      "00" /* SMS deliver */</span><br><span style="color: hsl(120, 100%, 40%);">+                      "05802443f2" /* originating address 42342 */</span><br><span style="color: hsl(120, 100%, 40%);">+                "00" /* TP-PID */</span><br><span style="color: hsl(120, 100%, 40%);">+                   "00" /* GSM default alphabet */</span><br><span style="color: hsl(120, 100%, 40%);">+                     "071010" /* Y-M-D (from wrapped gsm340_gen_scts())*/</span><br><span style="color: hsl(120, 100%, 40%);">+                "000000" /* H-M-S */</span><br><span style="color: hsl(120, 100%, 40%);">+                "00" /* GMT+0 */</span><br><span style="color: hsl(120, 100%, 40%);">+                    "44" /* data length */</span><br><span style="color: hsl(120, 100%, 40%);">+                      "5079da1e1ee7416937485e9ea7c965373d1d6683c270383b3d0e"</span><br><span style="color: hsl(120, 100%, 40%);">+                      "d3d36ff71c949e83c22072799e9687c5ec32a81d96afcbf4b4fb"</span><br><span style="color: hsl(120, 100%, 40%);">+                      "0c7ac3e9e9b7db05");</span><br><span style="color: hsl(120, 100%, 40%);">+ ms_sends_msg("0632");</span><br><span style="color: hsl(120, 100%, 40%);">+       VERBOSE_ASSERT(dtap_tx_confirmed, == true, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+   VERBOSE_ASSERT(paging_stopped, == true, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+    btw("SMS was delivered, no requests pending for subscr");</span><br><span style="color: hsl(120, 100%, 40%);">+   vsub = vlr_subscr_find_by_imsi(net->vlr, imsi);</span><br><span style="color: hsl(120, 100%, 40%);">+    OSMO_ASSERT(vsub);</span><br><span style="color: hsl(120, 100%, 40%);">+    VERBOSE_ASSERT(llist_count(&vsub->cs.requests), == 0, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+ vlr_subscr_put(vsub);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       btw("conn is still open to wait for SMS ack dance");</span><br><span style="color: hsl(120, 100%, 40%);">+        EXPECT_CONN_COUNT(1);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       btw("MS replies with CP-ACK for received SMS");</span><br><span style="color: hsl(120, 100%, 40%);">+     ms_sends_msg("8904");</span><br><span style="color: hsl(120, 100%, 40%);">+       EXPECT_CONN_COUNT(1);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       btw("MS also sends RP-ACK, MSC in turn sends CP-ACK for that");</span><br><span style="color: hsl(120, 100%, 40%);">+     dtap_expect_tx("0904");</span><br><span style="color: hsl(120, 100%, 40%);">+     expect_bssap_clear();</span><br><span style="color: hsl(120, 100%, 40%);">+ ms_sends_msg("890106020041020000");</span><br><span style="color: hsl(120, 100%, 40%);">+ VERBOSE_ASSERT(dtap_tx_confirmed, == true, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+   VERBOSE_ASSERT(bssap_clear_sent, == true, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  btw("SMS is done, conn is gone");</span><br><span style="color: hsl(120, 100%, 40%);">+   bss_sends_clear_complete();</span><br><span style="color: hsl(120, 100%, 40%);">+   EXPECT_CONN_COUNT(0);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+       BTW("subscriber detaches");</span><br><span style="color: hsl(120, 100%, 40%);">+ expect_bssap_clear();</span><br><span style="color: hsl(120, 100%, 40%);">+ ms_sends_msg("050130089910070000006402");</span><br><span style="color: hsl(120, 100%, 40%);">+   VERBOSE_ASSERT(bssap_clear_sent, == true, "%d");</span><br><span> </span><br><span>       bss_sends_clear_complete();</span><br><span>  EXPECT_CONN_COUNT(0);</span><br><span>@@ -1114,6 +1508,7 @@</span><br><span>        test_ciph_imeisv,</span><br><span>    test_ciph_tmsi_imei,</span><br><span>         test_gsm_ciph_in_umts_env,</span><br><span style="color: hsl(0, 100%, 40%);">-      test_a5_3_not_supported,</span><br><span style="color: hsl(120, 100%, 40%);">+      test_a5_3_supported,</span><br><span style="color: hsl(120, 100%, 40%);">+  test_cm_service_needs_classmark_update,</span><br><span>      NULL</span><br><span> };</span><br><span>diff --git a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err</span><br><span>index 6a00669..4a13b68 100644</span><br><span>--- a/tests/msc_vlr/msc_vlr_test_gsm_ciph.err</span><br><span>+++ b/tests/msc_vlr/msc_vlr_test_gsm_ciph.err</span><br><span>@@ -2260,7 +2260,7 @@</span><br><span> full talloc report on 'msgb' (total      0 bytes in   1 blocks)</span><br><span> talloc_total_blocks(tall_bsc_ctx) == 12</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-===== test_a5_3_not_supported</span><br><span style="color: hsl(120, 100%, 40%);">+===== test_a5_3_supported</span><br><span> - Location Update request causes a GSUP Send Auth Info request to HLR</span><br><span>   MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_LOC_UPD_REQUEST</span><br><span>   new conn</span><br><span>@@ -2309,7 +2309,7 @@</span><br><span>   lu_result_sent == 0</span><br><span>   auth_request_sent == 1</span><br><span> ---</span><br><span style="color: hsl(0, 100%, 40%);">-- MS sends Authen Response, VLR accepts and wants to send Ciphering Mode Command to MS -- alas, no matching cipher can be found, abort and release</span><br><span style="color: hsl(120, 100%, 40%);">+- MS sends Authen Response, VLR accepts and wants to send Ciphering Mode Command to MS -- but needs Classmark 2 to determine whether A5/3 is supported</span><br><span>   MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_AUTH_RESP</span><br><span> DREF IMSI:901700000004620: MSC conn use + dtap == 1 (0x2: dtap)</span><br><span> DRLL Dispatching 04.08 message GSM48_MT_MM_AUTH_RESP (0x5:0x14)</span><br><span>@@ -2326,23 +2326,98 @@</span><br><span> DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES</span><br><span> DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth()</span><br><span> DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode</span><br><span style="color: hsl(120, 100%, 40%);">+DMM IMSI:901700000004620: to determine whether A5/3 is supported, first ask for a Classmark Update to obtain Classmark 2</span><br><span style="color: hsl(120, 100%, 40%);">+  BSC <--BSSAP-BSS-MANAGEMENT-- MSC: CLASSMARK REQ [L3]> 00 01 58 </span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_AUTH_CIPH}: state_chg to SUBSCR_CONN_S_WAIT_CLASSMARK_UPDATE</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH</span><br><span style="color: hsl(120, 100%, 40%);">+DREF IMSI:901700000004620: MSC conn use - dtap == 0 (0x0: )</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_WAIT_CLASSMARK_UPDATE}: Received Event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_WAIT_CLASSMARK_UPDATE}: Awaiting results for Auth+Ciph, overruling event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+  lu_result_sent == 0</span><br><span style="color: hsl(120, 100%, 40%);">+- BSC sends back a BSSMAP Classmark Update, that triggers the Ciphering Mode Command in A5/3</span><br><span style="color: hsl(120, 100%, 40%);">+DMSC Looking for A subscriber: conn_id 0</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_WAIT_CLASSMARK_UPDATE}: Received Event SUBSCR_CONN_E_CLASSMARK_UPDATE</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_WAIT_CLASSMARK_UPDATE}: state_chg to SUBSCR_CONN_S_AUTH_CIPH</span><br><span> DMM -> CIPHER MODE COMMAND IMSI:901700000004620</span><br><span style="color: hsl(0, 100%, 40%);">-DMSC CLASSMARK 2 unknown, assuming MS doesn't support A5/3</span><br><span style="color: hsl(0, 100%, 40%);">-DMM IMSI:901700000004620: cannot start ciphering, no intersection between MSC-configured and MS-supported A5 algorithms</span><br><span style="color: hsl(0, 100%, 40%);">-- ERROR sending ciphering mode command: rc=-95</span><br><span style="color: hsl(0, 100%, 40%);">-DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_AUTH}: Failed to send Ciphering Mode Command</span><br><span style="color: hsl(0, 100%, 40%);">-- sending LU Reject for IMSI:901700000004620, cause 17</span><br><span style="color: hsl(0, 100%, 40%);">-DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_DONE</span><br><span style="color: hsl(0, 100%, 40%);">-DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_AUTH_CIPH}: Received Event SUBSCR_CONN_E_CN_CLOSE</span><br><span style="color: hsl(0, 100%, 40%);">-DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_AUTH_CIPH}: state_chg to SUBSCR_CONN_S_RELEASING</span><br><span style="color: hsl(0, 100%, 40%);">-DREF IMSI:901700000004620: MSC conn use + release == 2 (0x102: dtap,release)</span><br><span style="color: hsl(120, 100%, 40%);">+- sending Ciphering Mode Command for IMSI:901700000004620: include_imeisv=0</span><br><span style="color: hsl(120, 100%, 40%);">+- ...perm algo: A5/3</span><br><span style="color: hsl(120, 100%, 40%);">+- ...key: 61855fb81fc2a800</span><br><span style="color: hsl(120, 100%, 40%);">+  lu_result_sent == 0</span><br><span style="color: hsl(120, 100%, 40%);">+- MS sends Ciphering Mode Complete, VLR accepts and sends GSUP LU Req to HLR</span><br><span style="color: hsl(120, 100%, 40%);">+  MSC <--RAN_GERAN_A-- MS: GSM48_MT_RR_CIPH_M_COMPL</span><br><span style="color: hsl(120, 100%, 40%);">+DRR IMSI:901700000004620: CIPHERING MODE COMPLETE</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_CIPH}: Received Event VLR_ULA_E_CIPH_RES</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_CIPH}: vlr_loc_upd_post_ciph()</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_CIPH}: vlr_loc_upd_node_4()</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_CIPH}: state_chg to VLR_ULA_S_WAIT_HLR_UPD</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR upd_hlr_vlr_fsm(LU:901700000004620){UPD_HLR_VLR_S_INIT}: Allocated</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR upd_hlr_vlr_fsm(LU:901700000004620){UPD_HLR_VLR_S_INIT}: is child of vlr_lu_fsm(LU:901700000004620)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR upd_hlr_vlr_fsm(LU:901700000004620){UPD_HLR_VLR_S_INIT}: Received Event UPD_HLR_VLR_E_START</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR GSUP tx: 04010809710000004026f0</span><br><span style="color: hsl(120, 100%, 40%);">+GSUP --> HLR: OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST: 04010809710000004026f0</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR upd_hlr_vlr_fsm(LU:901700000004620){UPD_HLR_VLR_S_INIT}: state_chg to UPD_HLR_VLR_S_WAIT_FOR_DATA</span><br><span style="color: hsl(120, 100%, 40%);">+  lu_result_sent == 0</span><br><span style="color: hsl(120, 100%, 40%);">+- HLR sends _INSERT_DATA_REQUEST, VLR responds with _INSERT_DATA_RESULT</span><br><span style="color: hsl(120, 100%, 40%);">+<-- GSUP rx OSMO_GSUP_MSGT_INSERT_DATA_REQUEST: 10010809710000004026f00804032443f2</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR GSUP rx 17: 10010809710000004026f00804032443f2</span><br><span> DREF VLR subscr IMSI:901700000004620 usage increases to: 2</span><br><span style="color: hsl(0, 100%, 40%);">-DREF VLR subscr IMSI:901700000004620 usage decreases to: 1</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR IMSI:901700000004620 has MSISDN:42342</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR SUBSCR(MSISDN:42342) VLR: update for IMSI=901700000004620 (MSISDN=42342, used=2)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR GSUP tx: 12010809710000004026f0</span><br><span style="color: hsl(120, 100%, 40%);">+GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage decreases to: 1</span><br><span style="color: hsl(120, 100%, 40%);">+<-- GSUP rx OSMO_GSUP_MSGT_INSERT_DATA_REQUEST: vlr_gsupc_read_cb() returns 0</span><br><span style="color: hsl(120, 100%, 40%);">+  lu_result_sent == 0</span><br><span style="color: hsl(120, 100%, 40%);">+- HLR also sends GSUP _UPDATE_LOCATION_RESULT</span><br><span style="color: hsl(120, 100%, 40%);">+<-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: 06010809710000004026f0</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR GSUP rx 11: 06010809710000004026f0</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage increases to: 2</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_HLR_UPD}: Received Event VLR_ULA_E_HLR_LU_RES</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR upd_hlr_vlr_fsm(LU:901700000004620){UPD_HLR_VLR_S_WAIT_FOR_DATA}: Received Event UPD_HLR_VLR_E_UPD_LOC_ACK</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR upd_hlr_vlr_fsm(LU:901700000004620){UPD_HLR_VLR_S_WAIT_FOR_DATA}: state_chg to UPD_HLR_VLR_S_DONE</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR upd_hlr_vlr_fsm(LU:901700000004620){UPD_HLR_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_REGULAR)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR upd_hlr_vlr_fsm(LU:901700000004620){UPD_HLR_VLR_S_DONE}: Removing from parent vlr_lu_fsm(LU:901700000004620)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR upd_hlr_vlr_fsm(LU:901700000004620){UPD_HLR_VLR_S_DONE}: Freeing instance</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR upd_hlr_vlr_fsm(LU:901700000004620){UPD_HLR_VLR_S_DONE}: Deallocated</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_HLR_UPD}: Received Event VLR_ULA_E_UPD_HLR_COMPL</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_HLR_UPD}: state_chg to VLR_ULA_S_WAIT_LU_COMPL</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_INIT}: Allocated</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_INIT}: is child of vlr_lu_fsm(LU:901700000004620)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_INIT}: Received Event LU_COMPL_VLR_E_START</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_INIT}: state_chg to LU_COMPL_VLR_S_WAIT_SUB_PRES</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR sub_pres_vlr_fsm(LU:901700000004620){SUB_PRES_VLR_S_INIT}: Allocated</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR sub_pres_vlr_fsm(LU:901700000004620){SUB_PRES_VLR_S_INIT}: is child of lu_compl_vlr_fsm(LU:901700000004620)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR sub_pres_vlr_fsm(LU:901700000004620){SUB_PRES_VLR_S_INIT}: Received Event SUB_PRES_VLR_E_START</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR sub_pres_vlr_fsm(LU:901700000004620){SUB_PRES_VLR_S_INIT}: state_chg to SUB_PRES_VLR_S_DONE</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR sub_pres_vlr_fsm(LU:901700000004620){SUB_PRES_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_REGULAR)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR sub_pres_vlr_fsm(LU:901700000004620){SUB_PRES_VLR_S_DONE}: Removing from parent lu_compl_vlr_fsm(LU:901700000004620)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR sub_pres_vlr_fsm(LU:901700000004620){SUB_PRES_VLR_S_DONE}: Freeing instance</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR sub_pres_vlr_fsm(LU:901700000004620){SUB_PRES_VLR_S_DONE}: Deallocated</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_WAIT_SUB_PRES}: Received Event LU_COMPL_VLR_E_SUB_PRES_COMPL</span><br><span style="color: hsl(120, 100%, 40%);">+- sending LU Accept for MSISDN:42342</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage increases to: 3</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_WAIT_SUB_PRES}: state_chg to LU_COMPL_VLR_S_DONE</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_LU_COMPL_SUCCESS</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_DONE}: Removing from parent vlr_lu_fsm(LU:901700000004620)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_DONE}: Freeing instance</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_DONE}: Deallocated</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_LU_COMPL}: state_chg to VLR_ULA_S_DONE</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_AUTH_CIPH}: Received Event SUBSCR_CONN_E_ACCEPTED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_AUTH_CIPH}: state_chg to SUBSCR_CONN_S_ACCEPTED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_ACCEPTED}: Received Event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_ACCEPTED}: state_chg to SUBSCR_CONN_S_RELEASING</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use + release == 1 (0x100: release)</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage increases to: 4</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage decreases to: 3</span><br><span> - BSSAP Clear --RAN_GERAN_A--> MS</span><br><span style="color: hsl(0, 100%, 40%);">-DREF IMSI:901700000004620: MSC conn use - dtap == 1 (0x100: release)</span><br><span style="color: hsl(0, 100%, 40%);">-  lu_result_sent == 2</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage decreases to: 2</span><br><span style="color: hsl(120, 100%, 40%);">+<-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: vlr_gsupc_read_cb() returns 0</span><br><span style="color: hsl(120, 100%, 40%);">+  bssap_clear_sent == 1</span><br><span style="color: hsl(120, 100%, 40%);">+- LU was successful, and the conn has already been closed</span><br><span style="color: hsl(120, 100%, 40%);">+  lu_result_sent == 1</span><br><span> - BSS sends BSSMAP Clear Complete</span><br><span style="color: hsl(0, 100%, 40%);">-DREF IMSI:901700000004620: MSC conn use - release == 0 (0x0: )</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use - release == 0 (0x0: )</span><br><span> DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_RELEASING}: Received Event SUBSCR_CONN_E_UNUSED</span><br><span> DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_RELEASING}: state_chg to SUBSCR_CONN_S_RELEASED</span><br><span> DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_RELEASED}: Terminating (cause = OSMO_FSM_TERM_REGULAR)</span><br><span>@@ -2351,13 +2426,827 @@</span><br><span> DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_DONE}: fsm_lu_cleanup called with cause OSMO_FSM_TERM_PARENT</span><br><span> DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_DONE}: Freeing instance</span><br><span> DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_DONE}: Deallocated</span><br><span style="color: hsl(0, 100%, 40%);">-DRLL IMSI:901700000004620: Freeing subscriber connection</span><br><span style="color: hsl(0, 100%, 40%);">-DREF VLR subscr IMSI:901700000004620 usage decreases to: 0</span><br><span style="color: hsl(0, 100%, 40%);">-DREF freeing VLR subscr IMSI:901700000004620</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL MSISDN:42342: Freeing subscriber connection</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage decreases to: 1</span><br><span> DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_RELEASED}: Freeing instance</span><br><span> DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_RELEASED}: Deallocated</span><br><span>   llist_count(&net->subscr_conns) == 0</span><br><span style="color: hsl(0, 100%, 40%);">-===== test_a5_3_not_supported: SUCCESS</span><br><span style="color: hsl(120, 100%, 40%);">+---</span><br><span style="color: hsl(120, 100%, 40%);">+- after a while, a new conn sends a CM Service Request. VLR responds with Auth Req, 2nd auth vector</span><br><span style="color: hsl(120, 100%, 40%);">+  MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_CM_SERV_REQ</span><br><span style="color: hsl(120, 100%, 40%);">+  new conn</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn{SUBSCR_CONN_S_NEW}: Allocated</span><br><span style="color: hsl(120, 100%, 40%);">+DREF unknown: MSC conn use + compl_l3 == 1 (0x1: compl_l3)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message GSM48_MT_MM_CM_SERV_REQ (0x5:0x24)</span><br><span style="color: hsl(120, 100%, 40%);">+DMM <- CM SERVICE REQUEST serv_type=0x08 MI(IMSI)=901700000004620</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(CM_SERVICE_REQ:901700000004620){SUBSCR_CONN_S_NEW}: Updated ID</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_INIT}: Allocated</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_INIT}: is child of Subscr_Conn(CM_SERVICE_REQ:901700000004620)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_INIT}: rev=GSM net=GERAN Auth+Ciph</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_INIT}: Received Event PR_ARQ_E_START</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage increases to: 2</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage increases to: 3</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_INIT}: proc_arq_vlr_fn_post_imsi()</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_INIT}: state_chg to PR_ARQ_S_WAIT_AUTH</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(CM_SERVICE_REQ:901700000004620){VLR_SUB_AS_NEEDS_AUTH}: Allocated</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(CM_SERVICE_REQ:901700000004620){VLR_SUB_AS_NEEDS_AUTH}: is child of Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(CM_SERVICE_REQ:901700000004620){VLR_SUB_AS_NEEDS_AUTH}: Received Event VLR_AUTH_E_START</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(CM_SERVICE_REQ:901700000004620){VLR_SUB_AS_NEEDS_AUTH}: state_chg to VLR_SUB_AS_WAIT_RESP</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(CM_SERVICE_REQ:901700000004620){VLR_SUB_AS_WAIT_RESP}: got auth tuple: use_count=1 key_seq=1 -- will use GSM AKA (is_r99=no, at->vec.auth_types=0x1)</span><br><span style="color: hsl(120, 100%, 40%);">+- sending GSM Auth Request for MSISDN:42342: tuple use_count=1 key_seq=1 auth_types=0x1 and...</span><br><span style="color: hsl(120, 100%, 40%);">+- ...rand=12aca96fb4ffdea5c985cbafa9b6e18b</span><br><span style="color: hsl(120, 100%, 40%);">+- ...expecting sres=20bde240</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage decreases to: 2</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(CM_SERVICE_REQ:901700000004620){SUBSCR_CONN_S_NEW}: Received Event SUBSCR_CONN_E_COMPLETE_LAYER_3</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(CM_SERVICE_REQ:901700000004620){SUBSCR_CONN_S_NEW}: state_chg to SUBSCR_CONN_S_AUTH_CIPH</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use - compl_l3 == 0 (0x0: )</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(CM_SERVICE_REQ:901700000004620){SUBSCR_CONN_S_AUTH_CIPH}: Received Event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(CM_SERVICE_REQ:901700000004620){SUBSCR_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+  auth_request_sent == 1</span><br><span style="color: hsl(120, 100%, 40%);">+  cm_service_result_sent == 0</span><br><span style="color: hsl(120, 100%, 40%);">+- needs auth, not yet accepted</span><br><span style="color: hsl(120, 100%, 40%);">+msc_subscr_conn_is_accepted() == false</span><br><span style="color: hsl(120, 100%, 40%);">+  requests shall be thwarted</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message GSM48_MT_CC_SETUP (0x3:0x5)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL subscr MSISDN:42342: Message not permitted for initial conn: GSM48_MT_CC_SETUP</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message unknown 0x33 (0x5:0x33)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL subscr MSISDN:42342: Message not permitted for initial conn: unknown 0x33</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message GSM48_MT_RR_SYSINFO_1 (0x6:0x19)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL subscr MSISDN:42342: Message not permitted for initial conn: GSM48_MT_RR_SYSINFO_1</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message SMS:0x01 (0x9:0x1)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL subscr MSISDN:42342: Message not permitted for initial conn: SMS:0x01</span><br><span style="color: hsl(120, 100%, 40%);">+- MS sends Authen Response, VLR accepts and requests Ciphering. We already know Classmark 3, so no need to request Classmark Update.</span><br><span style="color: hsl(120, 100%, 40%);">+  MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_AUTH_RESP</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use + dtap == 1 (0x2: dtap)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message GSM48_MT_MM_AUTH_RESP (0x5:0x14)</span><br><span style="color: hsl(120, 100%, 40%);">+DMM MSISDN:42342: MM GSM AUTHENTICATION RESPONSE (sres = 20bde240)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(CM_SERVICE_REQ:901700000004620){VLR_SUB_AS_WAIT_RESP}: Received Event VLR_AUTH_E_MS_AUTH_RESP</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR SUBSCR(MSISDN:42342) AUTH on GERAN received SRES/RES: 20bde240 (4 bytes)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR SUBSCR(MSISDN:42342) AUTH established GSM security context</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(CM_SERVICE_REQ:901700000004620){VLR_SUB_AS_WAIT_RESP}: Authentication terminating with result PASSED</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(CM_SERVICE_REQ:901700000004620){VLR_SUB_AS_WAIT_RESP}: state_chg to VLR_SUB_AS_AUTHENTICATED</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(CM_SERVICE_REQ:901700000004620){VLR_SUB_AS_AUTHENTICATED}: Terminating (cause = OSMO_FSM_TERM_REGULAR)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(CM_SERVICE_REQ:901700000004620){VLR_SUB_AS_AUTHENTICATED}: Removing from parent Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(CM_SERVICE_REQ:901700000004620){VLR_SUB_AS_AUTHENTICATED}: Freeing instance</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(CM_SERVICE_REQ:901700000004620){VLR_SUB_AS_AUTHENTICATED}: Deallocated</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2()</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode</span><br><span style="color: hsl(120, 100%, 40%);">+DMM -> CIPHER MODE COMMAND MSISDN:42342</span><br><span style="color: hsl(120, 100%, 40%);">+- sending Ciphering Mode Command for MSISDN:42342: include_imeisv=0</span><br><span style="color: hsl(120, 100%, 40%);">+- ...perm algo: A5/3</span><br><span style="color: hsl(120, 100%, 40%);">+- ...key: 07fa7502e07e1c00</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use - dtap == 0 (0x0: )</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(CM_SERVICE_REQ:901700000004620){SUBSCR_CONN_S_AUTH_CIPH}: Received Event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(CM_SERVICE_REQ:901700000004620){SUBSCR_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+  cm_service_result_sent == 0</span><br><span style="color: hsl(120, 100%, 40%);">+  cipher_mode_cmd_sent == 1</span><br><span style="color: hsl(120, 100%, 40%);">+- needs ciph, not yet accepted</span><br><span style="color: hsl(120, 100%, 40%);">+msc_subscr_conn_is_accepted() == false</span><br><span style="color: hsl(120, 100%, 40%);">+  requests shall be thwarted</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message GSM48_MT_CC_SETUP (0x3:0x5)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL subscr MSISDN:42342: Message not permitted for initial conn: GSM48_MT_CC_SETUP</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message unknown 0x33 (0x5:0x33)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL subscr MSISDN:42342: Message not permitted for initial conn: unknown 0x33</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message GSM48_MT_RR_SYSINFO_1 (0x6:0x19)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL subscr MSISDN:42342: Message not permitted for initial conn: GSM48_MT_RR_SYSINFO_1</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message SMS:0x01 (0x9:0x1)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL subscr MSISDN:42342: Message not permitted for initial conn: SMS:0x01</span><br><span style="color: hsl(120, 100%, 40%);">+- MS sends Ciphering Mode Complete, VLR accepts; above Ciphering is an implicit CM Service Accept</span><br><span style="color: hsl(120, 100%, 40%);">+  MSC <--RAN_GERAN_A-- MS: GSM48_MT_RR_CIPH_M_COMPL</span><br><span style="color: hsl(120, 100%, 40%);">+DRR MSISDN:42342: CIPHERING MODE COMPLETE</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_WAIT_CIPH}: Received Event PR_ARQ_E_CIPH_RES</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_node2_post_ciph()</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_node2_post_vlr()</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_post_pres()</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_post_trace()</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_post_imei()</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_WAIT_CIPH}: proc_arq_fsm_done(PASSED)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_WAIT_CIPH}: state_chg to PR_ARQ_S_DONE</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_DONE}: Process Access Request result: PASSED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(CM_SERVICE_REQ:901700000004620){SUBSCR_CONN_S_AUTH_CIPH}: Received Event SUBSCR_CONN_E_ACCEPTED</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use + cm_service == 1 (0x8: cm_service)</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(CM_SERVICE_REQ:901700000004620){SUBSCR_CONN_S_AUTH_CIPH}: state_chg to SUBSCR_CONN_S_ACCEPTED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(CM_SERVICE_REQ:901700000004620){SUBSCR_CONN_S_ACCEPTED}: subscr_conn_fsm_has_active_transactions: still awaiting first request after a CM Service Request</span><br><span style="color: hsl(120, 100%, 40%);">+  cm_service_result_sent == 0</span><br><span style="color: hsl(120, 100%, 40%);">+- Concluding CM Service Request</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use - cm_service == 0 (0x0: )</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(CM_SERVICE_REQ:901700000004620){SUBSCR_CONN_S_ACCEPTED}: Received Event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(CM_SERVICE_REQ:901700000004620){SUBSCR_CONN_S_ACCEPTED}: state_chg to SUBSCR_CONN_S_RELEASING</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use + release == 1 (0x100: release)</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage increases to: 3</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage decreases to: 2</span><br><span style="color: hsl(120, 100%, 40%);">+- BSSAP Clear --RAN_GERAN_A--> MS</span><br><span style="color: hsl(120, 100%, 40%);">+  bssap_clear_sent == 1</span><br><span style="color: hsl(120, 100%, 40%);">+- all requests serviced, conn has been released</span><br><span style="color: hsl(120, 100%, 40%);">+- BSS sends BSSMAP Clear Complete</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use - release == 0 (0x0: )</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(CM_SERVICE_REQ:901700000004620){SUBSCR_CONN_S_RELEASING}: Received Event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(CM_SERVICE_REQ:901700000004620){SUBSCR_CONN_S_RELEASING}: state_chg to SUBSCR_CONN_S_RELEASED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(CM_SERVICE_REQ:901700000004620){SUBSCR_CONN_S_RELEASED}: Terminating (cause = OSMO_FSM_TERM_REGULAR)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_DONE}: Removing from parent Subscr_Conn(CM_SERVICE_REQ:901700000004620)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_DONE}: Freeing instance</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_DONE}: Deallocated</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL MSISDN:42342: Freeing subscriber connection</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage decreases to: 1</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(CM_SERVICE_REQ:901700000004620){SUBSCR_CONN_S_RELEASED}: Freeing instance</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(CM_SERVICE_REQ:901700000004620){SUBSCR_CONN_S_RELEASED}: Deallocated</span><br><span style="color: hsl(120, 100%, 40%);">+  llist_count(&net->subscr_conns) == 0</span><br><span style="color: hsl(120, 100%, 40%);">+---</span><br><span style="color: hsl(120, 100%, 40%);">+- an SMS is sent, MS is paged</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage increases to: 2</span><br><span style="color: hsl(120, 100%, 40%);">+  llist_count(&vsub->cs.requests) == 0</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage increases to: 3</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscriber MSISDN:42342 not paged yet, start paging.</span><br><span style="color: hsl(120, 100%, 40%);">+  RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0xffffffff, LAC 23</span><br><span style="color: hsl(120, 100%, 40%);">+  strcmp(paging_expecting_imsi, imsi) == 0</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage increases to: 4</span><br><span style="color: hsl(120, 100%, 40%);">+  llist_count(&vsub->cs.requests) == 1</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage decreases to: 3</span><br><span style="color: hsl(120, 100%, 40%);">+  paging_sent == 1</span><br><span style="color: hsl(120, 100%, 40%);">+  paging_stopped == 0</span><br><span style="color: hsl(120, 100%, 40%);">+- the subscriber and its pending request should remain</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage increases to: 4</span><br><span style="color: hsl(120, 100%, 40%);">+  llist_count(&vsub->cs.requests) == 1</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage decreases to: 3</span><br><span style="color: hsl(120, 100%, 40%);">+- MS replies with Paging Response, and VLR sends Auth Request with third key</span><br><span style="color: hsl(120, 100%, 40%);">+  MSC <--RAN_GERAN_A-- MS: GSM48_MT_RR_PAG_RESP</span><br><span style="color: hsl(120, 100%, 40%);">+  new conn</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn{SUBSCR_CONN_S_NEW}: Allocated</span><br><span style="color: hsl(120, 100%, 40%);">+DREF unknown: MSC conn use + compl_l3 == 1 (0x1: compl_l3)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message GSM48_MT_RR_PAG_RESP (0x6:0x27)</span><br><span style="color: hsl(120, 100%, 40%);">+DRR PAGING RESPONSE: MI(IMSI)=901700000004620</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_NEW}: Updated ID</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_INIT}: Allocated</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_INIT}: is child of Subscr_Conn(PAGING_RESP:901700000004620)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_INIT}: rev=GSM net=GERAN Auth+Ciph</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_INIT}: Received Event PR_ARQ_E_START</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage increases to: 4</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage increases to: 5</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_INIT}: proc_arq_vlr_fn_post_imsi()</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_INIT}: state_chg to PR_ARQ_S_WAIT_AUTH</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(PAGING_RESP:901700000004620){VLR_SUB_AS_NEEDS_AUTH}: Allocated</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(PAGING_RESP:901700000004620){VLR_SUB_AS_NEEDS_AUTH}: is child of Process_Access_Request_VLR(PAGING_RESP:901700000004620)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(PAGING_RESP:901700000004620){VLR_SUB_AS_NEEDS_AUTH}: Received Event VLR_AUTH_E_START</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(PAGING_RESP:901700000004620){VLR_SUB_AS_NEEDS_AUTH}: state_chg to VLR_SUB_AS_WAIT_RESP</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(PAGING_RESP:901700000004620){VLR_SUB_AS_WAIT_RESP}: got auth tuple: use_count=1 key_seq=2 -- will use GSM AKA (is_r99=no, at->vec.auth_types=0x1)</span><br><span style="color: hsl(120, 100%, 40%);">+- sending GSM Auth Request for MSISDN:42342: tuple use_count=1 key_seq=2 auth_types=0x1 and...</span><br><span style="color: hsl(120, 100%, 40%);">+- ...rand=e7c03ba7cf0e2fde82b2dc4d63077d42</span><br><span style="color: hsl(120, 100%, 40%);">+- ...expecting sres=a29514ae</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage decreases to: 4</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_NEW}: Received Event SUBSCR_CONN_E_COMPLETE_LAYER_3</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_NEW}: state_chg to SUBSCR_CONN_S_AUTH_CIPH</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use - compl_l3 == 0 (0x0: )</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_AUTH_CIPH}: Received Event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+  auth_request_sent == 1</span><br><span style="color: hsl(120, 100%, 40%);">+- needs auth, not yet accepted</span><br><span style="color: hsl(120, 100%, 40%);">+msc_subscr_conn_is_accepted() == false</span><br><span style="color: hsl(120, 100%, 40%);">+  requests shall be thwarted</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message GSM48_MT_CC_SETUP (0x3:0x5)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL subscr MSISDN:42342: Message not permitted for initial conn: GSM48_MT_CC_SETUP</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message unknown 0x33 (0x5:0x33)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL subscr MSISDN:42342: Message not permitted for initial conn: unknown 0x33</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message GSM48_MT_RR_SYSINFO_1 (0x6:0x19)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL subscr MSISDN:42342: Message not permitted for initial conn: GSM48_MT_RR_SYSINFO_1</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message SMS:0x01 (0x9:0x1)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL subscr MSISDN:42342: Message not permitted for initial conn: SMS:0x01</span><br><span style="color: hsl(120, 100%, 40%);">+- MS sends Authen Response, VLR accepts and requests Ciphering</span><br><span style="color: hsl(120, 100%, 40%);">+  MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_AUTH_RESP</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use + dtap == 1 (0x2: dtap)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message GSM48_MT_MM_AUTH_RESP (0x5:0x14)</span><br><span style="color: hsl(120, 100%, 40%);">+DMM MSISDN:42342: MM GSM AUTHENTICATION RESPONSE (sres = a29514ae)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(PAGING_RESP:901700000004620){VLR_SUB_AS_WAIT_RESP}: Received Event VLR_AUTH_E_MS_AUTH_RESP</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR SUBSCR(MSISDN:42342) AUTH on GERAN received SRES/RES: a29514ae (4 bytes)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR SUBSCR(MSISDN:42342) AUTH established GSM security context</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(PAGING_RESP:901700000004620){VLR_SUB_AS_WAIT_RESP}: Authentication terminating with result PASSED</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(PAGING_RESP:901700000004620){VLR_SUB_AS_WAIT_RESP}: state_chg to VLR_SUB_AS_AUTHENTICATED</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(PAGING_RESP:901700000004620){VLR_SUB_AS_AUTHENTICATED}: Terminating (cause = OSMO_FSM_TERM_REGULAR)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(PAGING_RESP:901700000004620){VLR_SUB_AS_AUTHENTICATED}: Removing from parent Process_Access_Request_VLR(PAGING_RESP:901700000004620)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(PAGING_RESP:901700000004620){VLR_SUB_AS_AUTHENTICATED}: Freeing instance</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(PAGING_RESP:901700000004620){VLR_SUB_AS_AUTHENTICATED}: Deallocated</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2()</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode</span><br><span style="color: hsl(120, 100%, 40%);">+DMM -> CIPHER MODE COMMAND MSISDN:42342</span><br><span style="color: hsl(120, 100%, 40%);">+- sending Ciphering Mode Command for MSISDN:42342: include_imeisv=0</span><br><span style="color: hsl(120, 100%, 40%);">+- ...perm algo: A5/3</span><br><span style="color: hsl(120, 100%, 40%);">+- ...key: e2b234f807886400</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use - dtap == 0 (0x0: )</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_AUTH_CIPH}: Received Event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+  cipher_mode_cmd_sent == 1</span><br><span style="color: hsl(120, 100%, 40%);">+- needs ciph, not yet accepted</span><br><span style="color: hsl(120, 100%, 40%);">+msc_subscr_conn_is_accepted() == false</span><br><span style="color: hsl(120, 100%, 40%);">+  requests shall be thwarted</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message GSM48_MT_CC_SETUP (0x3:0x5)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL subscr MSISDN:42342: Message not permitted for initial conn: GSM48_MT_CC_SETUP</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message unknown 0x33 (0x5:0x33)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL subscr MSISDN:42342: Message not permitted for initial conn: unknown 0x33</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message GSM48_MT_RR_SYSINFO_1 (0x6:0x19)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL subscr MSISDN:42342: Message not permitted for initial conn: GSM48_MT_RR_SYSINFO_1</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message SMS:0x01 (0x9:0x1)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL subscr MSISDN:42342: Message not permitted for initial conn: SMS:0x01</span><br><span style="color: hsl(120, 100%, 40%);">+- MS sends Ciphering Mode Complete, VLR accepts and sends pending SMS</span><br><span style="color: hsl(120, 100%, 40%);">+  MSC <--RAN_GERAN_A-- MS: GSM48_MT_RR_CIPH_M_COMPL</span><br><span style="color: hsl(120, 100%, 40%);">+DRR MSISDN:42342: CIPHERING MODE COMPLETE</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_WAIT_CIPH}: Received Event PR_ARQ_E_CIPH_RES</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_node2_post_ciph()</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_node2_post_vlr()</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_post_pres()</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_post_trace()</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_post_imei()</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_WAIT_CIPH}: proc_arq_fsm_done(PASSED)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_WAIT_CIPH}: state_chg to PR_ARQ_S_DONE</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_DONE}: Process Access Request result: PASSED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_AUTH_CIPH}: Received Event SUBSCR_CONN_E_ACCEPTED</span><br><span style="color: hsl(120, 100%, 40%);">+DPAG Paging success for MSISDN:42342 (event=0)</span><br><span style="color: hsl(120, 100%, 40%);">+DPAG Calling paging cbfn.</span><br><span style="color: hsl(120, 100%, 40%);">+DCC (ti 00 sub MSISDN:42342 callref 40000004) New transaction</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage increases to: 5</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use + trans_sms == 1 (0x20: trans_sms)</span><br><span style="color: hsl(120, 100%, 40%);">+DMSC msc_tx 91 bytes to MSISDN:42342 via RAN_GERAN_A</span><br><span style="color: hsl(120, 100%, 40%);">+- DTAP --RAN_GERAN_A--> MS: SMS:0x01: 09015801000791447758100650004c0005802443f2000007101000000000445079da1e1ee7416937485e9ea7c965373d1d6683c270383b3d0ed3d36ff71c949e83c22072799e9687c5ec32a81d96afcbf4b4fb0c7ac3e9e9b7db05</span><br><span style="color: hsl(120, 100%, 40%);">+- DTAP matches expected message</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage decreases to: 4</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_AUTH_CIPH}: state_chg to SUBSCR_CONN_S_ACCEPTED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_ACCEPTED}: subscr_conn_fsm_has_active_transactions: connection still has active transaction: SMS</span><br><span style="color: hsl(120, 100%, 40%);">+  dtap_tx_confirmed == 1</span><br><span style="color: hsl(120, 100%, 40%);">+  paging_stopped == 1</span><br><span style="color: hsl(120, 100%, 40%);">+- SMS was delivered, no requests pending for subscr</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage increases to: 5</span><br><span style="color: hsl(120, 100%, 40%);">+  llist_count(&vsub->cs.requests) == 0</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage decreases to: 4</span><br><span style="color: hsl(120, 100%, 40%);">+- conn is still open to wait for SMS ack dance</span><br><span style="color: hsl(120, 100%, 40%);">+  llist_count(&net->subscr_conns) == 1</span><br><span style="color: hsl(120, 100%, 40%);">+- MS replies with CP-ACK for received SMS</span><br><span style="color: hsl(120, 100%, 40%);">+  MSC <--RAN_GERAN_A-- MS: SMS:0x04</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use + dtap == 2 (0x22: dtap,trans_sms)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message SMS:0x04 (0x9:0x4)</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_ACCEPTED}: Received Event SUBSCR_CONN_E_COMMUNICATING</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_ACCEPTED}: state_chg to SUBSCR_CONN_S_COMMUNICATING</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use - dtap == 1 (0x20: trans_sms)</span><br><span style="color: hsl(120, 100%, 40%);">+  llist_count(&net->subscr_conns) == 1</span><br><span style="color: hsl(120, 100%, 40%);">+- MS also sends RP-ACK, MSC in turn sends CP-ACK for that</span><br><span style="color: hsl(120, 100%, 40%);">+  MSC <--RAN_GERAN_A-- MS: SMS:0x01</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use + dtap == 2 (0x22: dtap,trans_sms)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message SMS:0x01 (0x9:0x1)</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_COMMUNICATING</span><br><span style="color: hsl(120, 100%, 40%);">+DMSC msc_tx 2 bytes to MSISDN:42342 via RAN_GERAN_A</span><br><span style="color: hsl(120, 100%, 40%);">+- DTAP --RAN_GERAN_A--> MS: SMS:0x04: 0904</span><br><span style="color: hsl(120, 100%, 40%);">+- DTAP matches expected message</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage decreases to: 3</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage decreases to: 2</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use - trans_sms == 1 (0x2: dtap)</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use - dtap == 0 (0x0: )</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_COMMUNICATING}: state_chg to SUBSCR_CONN_S_RELEASING</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use + release == 1 (0x100: release)</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage increases to: 3</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage decreases to: 2</span><br><span style="color: hsl(120, 100%, 40%);">+- BSSAP Clear --RAN_GERAN_A--> MS</span><br><span style="color: hsl(120, 100%, 40%);">+  dtap_tx_confirmed == 1</span><br><span style="color: hsl(120, 100%, 40%);">+  bssap_clear_sent == 1</span><br><span style="color: hsl(120, 100%, 40%);">+- SMS is done, conn is gone</span><br><span style="color: hsl(120, 100%, 40%);">+- BSS sends BSSMAP Clear Complete</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use - release == 0 (0x0: )</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_RELEASING}: Received Event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_RELEASING}: state_chg to SUBSCR_CONN_S_RELEASED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_RELEASED}: Terminating (cause = OSMO_FSM_TERM_REGULAR)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_DONE}: Removing from parent Subscr_Conn(PAGING_RESP:901700000004620)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_DONE}: Freeing instance</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_DONE}: Deallocated</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL MSISDN:42342: Freeing subscriber connection</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage decreases to: 1</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_RELEASED}: Freeing instance</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_RELEASED}: Deallocated</span><br><span style="color: hsl(120, 100%, 40%);">+  llist_count(&net->subscr_conns) == 0</span><br><span style="color: hsl(120, 100%, 40%);">+---</span><br><span style="color: hsl(120, 100%, 40%);">+- subscriber detaches</span><br><span style="color: hsl(120, 100%, 40%);">+  MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_IMSI_DETACH_IND</span><br><span style="color: hsl(120, 100%, 40%);">+  new conn</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn{SUBSCR_CONN_S_NEW}: Allocated</span><br><span style="color: hsl(120, 100%, 40%);">+DREF unknown: MSC conn use + compl_l3 == 1 (0x1: compl_l3)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message GSM48_MT_MM_IMSI_DETACH_IND (0x5:0x1)</span><br><span style="color: hsl(120, 100%, 40%);">+DMM IMSI DETACH INDICATION: MI(IMSI)=901700000004620</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage increases to: 2</span><br><span style="color: hsl(120, 100%, 40%);">+DMM IMSI DETACH for MSISDN:42342</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage increases to: 3</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage decreases to: 2</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage decreases to: 1</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage decreases to: 0</span><br><span style="color: hsl(120, 100%, 40%);">+DREF freeing VLR subscr MSISDN:42342</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn{SUBSCR_CONN_S_NEW}: Received Event SUBSCR_CONN_E_CN_CLOSE</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn{SUBSCR_CONN_S_NEW}: state_chg to SUBSCR_CONN_S_RELEASING</span><br><span style="color: hsl(120, 100%, 40%);">+DREF unknown: MSC conn use + release == 2 (0x101: compl_l3,release)</span><br><span style="color: hsl(120, 100%, 40%);">+- BSSAP Clear --RAN_GERAN_A--> MS</span><br><span style="color: hsl(120, 100%, 40%);">+DREF unknown: MSC conn use - compl_l3 == 1 (0x100: release)</span><br><span style="color: hsl(120, 100%, 40%);">+  bssap_clear_sent == 1</span><br><span style="color: hsl(120, 100%, 40%);">+- BSS sends BSSMAP Clear Complete</span><br><span style="color: hsl(120, 100%, 40%);">+DREF unknown: MSC conn use - release == 0 (0x0: )</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn{SUBSCR_CONN_S_RELEASING}: Received Event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn{SUBSCR_CONN_S_RELEASING}: state_chg to SUBSCR_CONN_S_RELEASED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn{SUBSCR_CONN_S_RELEASED}: Terminating (cause = OSMO_FSM_TERM_REGULAR)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Freeing subscriber connection with NULL subscriber</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn{SUBSCR_CONN_S_RELEASED}: Freeing instance</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn{SUBSCR_CONN_S_RELEASED}: Deallocated</span><br><span style="color: hsl(120, 100%, 40%);">+  llist_count(&net->subscr_conns) == 0</span><br><span style="color: hsl(120, 100%, 40%);">+===== test_a5_3_supported: SUCCESS</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+full talloc report on 'msgb' (total      0 bytes in   1 blocks)</span><br><span style="color: hsl(120, 100%, 40%);">+talloc_total_blocks(tall_bsc_ctx) == 12</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+===== test_cm_service_needs_classmark_update</span><br><span style="color: hsl(120, 100%, 40%);">+- Location Update request causes a GSUP Send Auth Info request to HLR</span><br><span style="color: hsl(120, 100%, 40%);">+  MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_LOC_UPD_REQUEST</span><br><span style="color: hsl(120, 100%, 40%);">+  new conn</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn{SUBSCR_CONN_S_NEW}: Allocated</span><br><span style="color: hsl(120, 100%, 40%);">+DREF unknown: MSC conn use + compl_l3 == 1 (0x1: compl_l3)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message GSM48_MT_MM_LOC_UPD_REQUEST (0x5:0x8)</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_NEW}: Updated ID</span><br><span style="color: hsl(120, 100%, 40%);">+DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH</span><br><span style="color: hsl(120, 100%, 40%);">+DMM LU/new-LAC: 1/23</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_IDLE}: Allocated</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(LU:901700000004620)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth+Ciph</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_IDLE}: Received Event VLR_ULA_E_UPDATE_LA</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr unknown usage increases to: 1</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR set IMSI on subscriber; IMSI=901700000004620 id=901700000004620</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR New subscr, IMSI: 901700000004620</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr IMSI:901700000004620 usage increases to: 2</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr IMSI:901700000004620 usage decreases to: 1</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_IDLE}: vlr_loc_upd_node1()</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(LU:901700000004620){VLR_SUB_AS_NEEDS_AUTH}: Allocated</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(LU:901700000004620){VLR_SUB_AS_NEEDS_AUTH}: is child of vlr_lu_fsm(LU:901700000004620)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(LU:901700000004620){VLR_SUB_AS_NEEDS_AUTH}: Received Event VLR_AUTH_E_START</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR GSUP tx: 08010809710000004026f0</span><br><span style="color: hsl(120, 100%, 40%);">+GSUP --> HLR: OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST: 08010809710000004026f0</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(LU:901700000004620){VLR_SUB_AS_NEEDS_AUTH}: state_chg to VLR_SUB_AS_NEEDS_AUTH_WAIT_AI</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_NEW}: Received Event SUBSCR_CONN_E_COMPLETE_LAYER_3</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_NEW}: state_chg to SUBSCR_CONN_S_AUTH_CIPH</span><br><span style="color: hsl(120, 100%, 40%);">+DREF IMSI:901700000004620: MSC conn use - compl_l3 == 0 (0x0: )</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_AUTH_CIPH}: Received Event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+  lu_result_sent == 0</span><br><span style="color: hsl(120, 100%, 40%);">+- from HLR, rx _SEND_AUTH_INFO_RESULT; VLR sends Auth Req to MS</span><br><span style="color: hsl(120, 100%, 40%);">+<-- GSUP rx OSMO_GSUP_MSGT_SEND_AUTH_INFO_RESULT: 0a010809710000004026f003222010585df1ae287f6e273dce07090d61320b21042d8b2c3e220861855fb81fc2a8000322201012aca96fb4ffdea5c985cbafa9b6e18b210420bde240220807fa7502e07e1c0003222010e7c03ba7cf0e2fde82b2dc4d63077d422104a29514ae2208e2b234f80788640003222010fa8f20b781b5881329d4fea26b1a3c5121045afc8d7222082392f14f709ae000032220100fd4cc8dbe8715d1f439e304edfd68dc2104bc8d1c5b2208da7cdd6bfe2d7000</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR GSUP rx 191: 0a010809710000004026f003222010585df1ae287f6e273dce07090d61320b21042d8b2c3e220861855fb81fc2a8000322201012aca96fb4ffdea5c985cbafa9b6e18b210420bde240220807fa7502e07e1c0003222010e7c03ba7cf0e2fde82b2dc4d63077d422104a29514ae2208e2b234f80788640003222010fa8f20b781b5881329d4fea26b1a3c5121045afc8d7222082392f14f709ae000032220100fd4cc8dbe8715d1f439e304edfd68dc2104bc8d1c5b2208da7cdd6bfe2d7000</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr IMSI:901700000004620 usage increases to: 2</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(LU:901700000004620){VLR_SUB_AS_NEEDS_AUTH_WAIT_AI}: Received Event VLR_AUTH_E_HLR_SAI_ACK</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR SUBSCR(IMSI:901700000004620) Received 5 auth tuples</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(LU:901700000004620){VLR_SUB_AS_NEEDS_AUTH_WAIT_AI}: state_chg to VLR_SUB_AS_WAIT_RESP</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(LU:901700000004620){VLR_SUB_AS_WAIT_RESP}: got auth tuple: use_count=1 key_seq=0 -- will use GSM AKA (is_r99=no, at->vec.auth_types=0x1)</span><br><span style="color: hsl(120, 100%, 40%);">+- sending GSM Auth Request for IMSI:901700000004620: tuple use_count=1 key_seq=0 auth_types=0x1 and...</span><br><span style="color: hsl(120, 100%, 40%);">+- ...rand=585df1ae287f6e273dce07090d61320b</span><br><span style="color: hsl(120, 100%, 40%);">+- ...expecting sres=2d8b2c3e</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr IMSI:901700000004620 usage decreases to: 1</span><br><span style="color: hsl(120, 100%, 40%);">+<-- GSUP rx OSMO_GSUP_MSGT_SEND_AUTH_INFO_RESULT: vlr_gsupc_read_cb() returns 0</span><br><span style="color: hsl(120, 100%, 40%);">+  lu_result_sent == 0</span><br><span style="color: hsl(120, 100%, 40%);">+  auth_request_sent == 1</span><br><span style="color: hsl(120, 100%, 40%);">+---</span><br><span style="color: hsl(120, 100%, 40%);">+- MS sends Authen Response, VLR accepts and wants to send Ciphering Mode Command to MS -- but needs Classmark 2 to determine whether A5/3 is supported</span><br><span style="color: hsl(120, 100%, 40%);">+  MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_AUTH_RESP</span><br><span style="color: hsl(120, 100%, 40%);">+DREF IMSI:901700000004620: MSC conn use + dtap == 1 (0x2: dtap)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message GSM48_MT_MM_AUTH_RESP (0x5:0x14)</span><br><span style="color: hsl(120, 100%, 40%);">+DMM IMSI:901700000004620: MM GSM AUTHENTICATION RESPONSE (sres = 2d8b2c3e)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(LU:901700000004620){VLR_SUB_AS_WAIT_RESP}: Received Event VLR_AUTH_E_MS_AUTH_RESP</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR SUBSCR(IMSI:901700000004620) AUTH on GERAN received SRES/RES: 2d8b2c3e (4 bytes)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR SUBSCR(IMSI:901700000004620) AUTH established GSM security context</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(LU:901700000004620){VLR_SUB_AS_WAIT_RESP}: Authentication terminating with result PASSED</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(LU:901700000004620){VLR_SUB_AS_WAIT_RESP}: state_chg to VLR_SUB_AS_AUTHENTICATED</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(LU:901700000004620){VLR_SUB_AS_AUTHENTICATED}: Terminating (cause = OSMO_FSM_TERM_REGULAR)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(LU:901700000004620){VLR_SUB_AS_AUTHENTICATED}: Removing from parent vlr_lu_fsm(LU:901700000004620)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(LU:901700000004620){VLR_SUB_AS_AUTHENTICATED}: Freeing instance</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(LU:901700000004620){VLR_SUB_AS_AUTHENTICATED}: Deallocated</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth()</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode</span><br><span style="color: hsl(120, 100%, 40%);">+DMM IMSI:901700000004620: to determine whether A5/3 is supported, first ask for a Classmark Update to obtain Classmark 2</span><br><span style="color: hsl(120, 100%, 40%);">+  BSC <--BSSAP-BSS-MANAGEMENT-- MSC: CLASSMARK REQ [L3]> 00 01 58 </span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_AUTH_CIPH}: state_chg to SUBSCR_CONN_S_WAIT_CLASSMARK_UPDATE</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH</span><br><span style="color: hsl(120, 100%, 40%);">+DREF IMSI:901700000004620: MSC conn use - dtap == 0 (0x0: )</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_WAIT_CLASSMARK_UPDATE}: Received Event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_WAIT_CLASSMARK_UPDATE}: Awaiting results for Auth+Ciph, overruling event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+  lu_result_sent == 0</span><br><span style="color: hsl(120, 100%, 40%);">+- BSC sends back a BSSMAP Classmark Update, that triggers the Ciphering Mode Command in A5/3</span><br><span style="color: hsl(120, 100%, 40%);">+DMSC Looking for A subscriber: conn_id 0</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_WAIT_CLASSMARK_UPDATE}: Received Event SUBSCR_CONN_E_CLASSMARK_UPDATE</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_WAIT_CLASSMARK_UPDATE}: state_chg to SUBSCR_CONN_S_AUTH_CIPH</span><br><span style="color: hsl(120, 100%, 40%);">+DMM -> CIPHER MODE COMMAND IMSI:901700000004620</span><br><span style="color: hsl(120, 100%, 40%);">+- sending Ciphering Mode Command for IMSI:901700000004620: include_imeisv=0</span><br><span style="color: hsl(120, 100%, 40%);">+- ...perm algo: A5/3</span><br><span style="color: hsl(120, 100%, 40%);">+- ...key: 61855fb81fc2a800</span><br><span style="color: hsl(120, 100%, 40%);">+  lu_result_sent == 0</span><br><span style="color: hsl(120, 100%, 40%);">+- MS sends Ciphering Mode Complete, VLR accepts and sends GSUP LU Req to HLR</span><br><span style="color: hsl(120, 100%, 40%);">+  MSC <--RAN_GERAN_A-- MS: GSM48_MT_RR_CIPH_M_COMPL</span><br><span style="color: hsl(120, 100%, 40%);">+DRR IMSI:901700000004620: CIPHERING MODE COMPLETE</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_CIPH}: Received Event VLR_ULA_E_CIPH_RES</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_CIPH}: vlr_loc_upd_post_ciph()</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_CIPH}: vlr_loc_upd_node_4()</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_CIPH}: state_chg to VLR_ULA_S_WAIT_HLR_UPD</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR upd_hlr_vlr_fsm(LU:901700000004620){UPD_HLR_VLR_S_INIT}: Allocated</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR upd_hlr_vlr_fsm(LU:901700000004620){UPD_HLR_VLR_S_INIT}: is child of vlr_lu_fsm(LU:901700000004620)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR upd_hlr_vlr_fsm(LU:901700000004620){UPD_HLR_VLR_S_INIT}: Received Event UPD_HLR_VLR_E_START</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR GSUP tx: 04010809710000004026f0</span><br><span style="color: hsl(120, 100%, 40%);">+GSUP --> HLR: OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST: 04010809710000004026f0</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR upd_hlr_vlr_fsm(LU:901700000004620){UPD_HLR_VLR_S_INIT}: state_chg to UPD_HLR_VLR_S_WAIT_FOR_DATA</span><br><span style="color: hsl(120, 100%, 40%);">+  lu_result_sent == 0</span><br><span style="color: hsl(120, 100%, 40%);">+- HLR sends _INSERT_DATA_REQUEST, VLR responds with _INSERT_DATA_RESULT</span><br><span style="color: hsl(120, 100%, 40%);">+<-- GSUP rx OSMO_GSUP_MSGT_INSERT_DATA_REQUEST: 10010809710000004026f00804032443f2</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR GSUP rx 17: 10010809710000004026f00804032443f2</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr IMSI:901700000004620 usage increases to: 2</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR IMSI:901700000004620 has MSISDN:42342</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR SUBSCR(MSISDN:42342) VLR: update for IMSI=901700000004620 (MSISDN=42342, used=2)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR GSUP tx: 12010809710000004026f0</span><br><span style="color: hsl(120, 100%, 40%);">+GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000004026f0</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage decreases to: 1</span><br><span style="color: hsl(120, 100%, 40%);">+<-- GSUP rx OSMO_GSUP_MSGT_INSERT_DATA_REQUEST: vlr_gsupc_read_cb() returns 0</span><br><span style="color: hsl(120, 100%, 40%);">+  lu_result_sent == 0</span><br><span style="color: hsl(120, 100%, 40%);">+- HLR also sends GSUP _UPDATE_LOCATION_RESULT</span><br><span style="color: hsl(120, 100%, 40%);">+<-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: 06010809710000004026f0</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR GSUP rx 11: 06010809710000004026f0</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage increases to: 2</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_HLR_UPD}: Received Event VLR_ULA_E_HLR_LU_RES</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR upd_hlr_vlr_fsm(LU:901700000004620){UPD_HLR_VLR_S_WAIT_FOR_DATA}: Received Event UPD_HLR_VLR_E_UPD_LOC_ACK</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR upd_hlr_vlr_fsm(LU:901700000004620){UPD_HLR_VLR_S_WAIT_FOR_DATA}: state_chg to UPD_HLR_VLR_S_DONE</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR upd_hlr_vlr_fsm(LU:901700000004620){UPD_HLR_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_REGULAR)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR upd_hlr_vlr_fsm(LU:901700000004620){UPD_HLR_VLR_S_DONE}: Removing from parent vlr_lu_fsm(LU:901700000004620)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR upd_hlr_vlr_fsm(LU:901700000004620){UPD_HLR_VLR_S_DONE}: Freeing instance</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR upd_hlr_vlr_fsm(LU:901700000004620){UPD_HLR_VLR_S_DONE}: Deallocated</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_HLR_UPD}: Received Event VLR_ULA_E_UPD_HLR_COMPL</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_HLR_UPD}: state_chg to VLR_ULA_S_WAIT_LU_COMPL</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_INIT}: Allocated</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_INIT}: is child of vlr_lu_fsm(LU:901700000004620)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_INIT}: Received Event LU_COMPL_VLR_E_START</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_INIT}: state_chg to LU_COMPL_VLR_S_WAIT_SUB_PRES</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR sub_pres_vlr_fsm(LU:901700000004620){SUB_PRES_VLR_S_INIT}: Allocated</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR sub_pres_vlr_fsm(LU:901700000004620){SUB_PRES_VLR_S_INIT}: is child of lu_compl_vlr_fsm(LU:901700000004620)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR sub_pres_vlr_fsm(LU:901700000004620){SUB_PRES_VLR_S_INIT}: Received Event SUB_PRES_VLR_E_START</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR sub_pres_vlr_fsm(LU:901700000004620){SUB_PRES_VLR_S_INIT}: state_chg to SUB_PRES_VLR_S_DONE</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR sub_pres_vlr_fsm(LU:901700000004620){SUB_PRES_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_REGULAR)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR sub_pres_vlr_fsm(LU:901700000004620){SUB_PRES_VLR_S_DONE}: Removing from parent lu_compl_vlr_fsm(LU:901700000004620)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR sub_pres_vlr_fsm(LU:901700000004620){SUB_PRES_VLR_S_DONE}: Freeing instance</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR sub_pres_vlr_fsm(LU:901700000004620){SUB_PRES_VLR_S_DONE}: Deallocated</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_WAIT_SUB_PRES}: Received Event LU_COMPL_VLR_E_SUB_PRES_COMPL</span><br><span style="color: hsl(120, 100%, 40%);">+- sending LU Accept for MSISDN:42342</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage increases to: 3</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_WAIT_SUB_PRES}: state_chg to LU_COMPL_VLR_S_DONE</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_LU_COMPL_SUCCESS</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_DONE}: Removing from parent vlr_lu_fsm(LU:901700000004620)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_DONE}: Freeing instance</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR lu_compl_vlr_fsm(LU:901700000004620){LU_COMPL_VLR_S_DONE}: Deallocated</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_LU_COMPL}: state_chg to VLR_ULA_S_DONE</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_AUTH_CIPH}: Received Event SUBSCR_CONN_E_ACCEPTED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_AUTH_CIPH}: state_chg to SUBSCR_CONN_S_ACCEPTED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_ACCEPTED}: Received Event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_ACCEPTED}: state_chg to SUBSCR_CONN_S_RELEASING</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use + release == 1 (0x100: release)</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage increases to: 4</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage decreases to: 3</span><br><span style="color: hsl(120, 100%, 40%);">+- BSSAP Clear --RAN_GERAN_A--> MS</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage decreases to: 2</span><br><span style="color: hsl(120, 100%, 40%);">+<-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: vlr_gsupc_read_cb() returns 0</span><br><span style="color: hsl(120, 100%, 40%);">+  bssap_clear_sent == 1</span><br><span style="color: hsl(120, 100%, 40%);">+- LU was successful, and the conn has already been closed</span><br><span style="color: hsl(120, 100%, 40%);">+  lu_result_sent == 1</span><br><span style="color: hsl(120, 100%, 40%);">+- BSS sends BSSMAP Clear Complete</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use - release == 0 (0x0: )</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_RELEASING}: Received Event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_RELEASING}: state_chg to SUBSCR_CONN_S_RELEASED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_RELEASED}: Terminating (cause = OSMO_FSM_TERM_REGULAR)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_DONE}: Removing from parent Subscr_Conn(LU:901700000004620)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_DONE}: fsm_lu_cleanup called with cause OSMO_FSM_TERM_PARENT</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_DONE}: Freeing instance</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_DONE}: Deallocated</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL MSISDN:42342: Freeing subscriber connection</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage decreases to: 1</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_RELEASED}: Freeing instance</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_RELEASED}: Deallocated</span><br><span style="color: hsl(120, 100%, 40%);">+  llist_count(&net->subscr_conns) == 0</span><br><span style="color: hsl(120, 100%, 40%);">+---</span><br><span style="color: hsl(120, 100%, 40%);">+- after a while, a new conn sends a CM Service Request. VLR responds with Auth Req, 2nd auth vector</span><br><span style="color: hsl(120, 100%, 40%);">+  MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_CM_SERV_REQ</span><br><span style="color: hsl(120, 100%, 40%);">+  new conn</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn{SUBSCR_CONN_S_NEW}: Allocated</span><br><span style="color: hsl(120, 100%, 40%);">+DREF unknown: MSC conn use + compl_l3 == 1 (0x1: compl_l3)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message GSM48_MT_MM_CM_SERV_REQ (0x5:0x24)</span><br><span style="color: hsl(120, 100%, 40%);">+DMM <- CM SERVICE REQUEST serv_type=0x08 MI(IMSI)=901700000004620</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(CM_SERVICE_REQ:901700000004620){SUBSCR_CONN_S_NEW}: Updated ID</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_INIT}: Allocated</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_INIT}: is child of Subscr_Conn(CM_SERVICE_REQ:901700000004620)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_INIT}: rev=GSM net=GERAN Auth+Ciph</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_INIT}: Received Event PR_ARQ_E_START</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage increases to: 2</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage increases to: 3</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_INIT}: proc_arq_vlr_fn_post_imsi()</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_INIT}: state_chg to PR_ARQ_S_WAIT_AUTH</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(CM_SERVICE_REQ:901700000004620){VLR_SUB_AS_NEEDS_AUTH}: Allocated</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(CM_SERVICE_REQ:901700000004620){VLR_SUB_AS_NEEDS_AUTH}: is child of Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(CM_SERVICE_REQ:901700000004620){VLR_SUB_AS_NEEDS_AUTH}: Received Event VLR_AUTH_E_START</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(CM_SERVICE_REQ:901700000004620){VLR_SUB_AS_NEEDS_AUTH}: state_chg to VLR_SUB_AS_WAIT_RESP</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(CM_SERVICE_REQ:901700000004620){VLR_SUB_AS_WAIT_RESP}: got auth tuple: use_count=1 key_seq=1 -- will use GSM AKA (is_r99=no, at->vec.auth_types=0x1)</span><br><span style="color: hsl(120, 100%, 40%);">+- sending GSM Auth Request for MSISDN:42342: tuple use_count=1 key_seq=1 auth_types=0x1 and...</span><br><span style="color: hsl(120, 100%, 40%);">+- ...rand=12aca96fb4ffdea5c985cbafa9b6e18b</span><br><span style="color: hsl(120, 100%, 40%);">+- ...expecting sres=20bde240</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage decreases to: 2</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(CM_SERVICE_REQ:901700000004620){SUBSCR_CONN_S_NEW}: Received Event SUBSCR_CONN_E_COMPLETE_LAYER_3</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(CM_SERVICE_REQ:901700000004620){SUBSCR_CONN_S_NEW}: state_chg to SUBSCR_CONN_S_AUTH_CIPH</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use - compl_l3 == 0 (0x0: )</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(CM_SERVICE_REQ:901700000004620){SUBSCR_CONN_S_AUTH_CIPH}: Received Event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(CM_SERVICE_REQ:901700000004620){SUBSCR_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+  auth_request_sent == 1</span><br><span style="color: hsl(120, 100%, 40%);">+  cm_service_result_sent == 0</span><br><span style="color: hsl(120, 100%, 40%);">+- needs auth, not yet accepted</span><br><span style="color: hsl(120, 100%, 40%);">+msc_subscr_conn_is_accepted() == false</span><br><span style="color: hsl(120, 100%, 40%);">+  requests shall be thwarted</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message GSM48_MT_CC_SETUP (0x3:0x5)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL subscr MSISDN:42342: Message not permitted for initial conn: GSM48_MT_CC_SETUP</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message unknown 0x33 (0x5:0x33)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL subscr MSISDN:42342: Message not permitted for initial conn: unknown 0x33</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message GSM48_MT_RR_SYSINFO_1 (0x6:0x19)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL subscr MSISDN:42342: Message not permitted for initial conn: GSM48_MT_RR_SYSINFO_1</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message SMS:0x01 (0x9:0x1)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL subscr MSISDN:42342: Message not permitted for initial conn: SMS:0x01</span><br><span style="color: hsl(120, 100%, 40%);">+- MS sends Authen Response, VLR accepts and requests Ciphering. We already know Classmark 3, so no need to request Classmark Update.</span><br><span style="color: hsl(120, 100%, 40%);">+  MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_AUTH_RESP</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use + dtap == 1 (0x2: dtap)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message GSM48_MT_MM_AUTH_RESP (0x5:0x14)</span><br><span style="color: hsl(120, 100%, 40%);">+DMM MSISDN:42342: MM GSM AUTHENTICATION RESPONSE (sres = 20bde240)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(CM_SERVICE_REQ:901700000004620){VLR_SUB_AS_WAIT_RESP}: Received Event VLR_AUTH_E_MS_AUTH_RESP</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR SUBSCR(MSISDN:42342) AUTH on GERAN received SRES/RES: 20bde240 (4 bytes)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR SUBSCR(MSISDN:42342) AUTH established GSM security context</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(CM_SERVICE_REQ:901700000004620){VLR_SUB_AS_WAIT_RESP}: Authentication terminating with result PASSED</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(CM_SERVICE_REQ:901700000004620){VLR_SUB_AS_WAIT_RESP}: state_chg to VLR_SUB_AS_AUTHENTICATED</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(CM_SERVICE_REQ:901700000004620){VLR_SUB_AS_AUTHENTICATED}: Terminating (cause = OSMO_FSM_TERM_REGULAR)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(CM_SERVICE_REQ:901700000004620){VLR_SUB_AS_AUTHENTICATED}: Removing from parent Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(CM_SERVICE_REQ:901700000004620){VLR_SUB_AS_AUTHENTICATED}: Freeing instance</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(CM_SERVICE_REQ:901700000004620){VLR_SUB_AS_AUTHENTICATED}: Deallocated</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2()</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode</span><br><span style="color: hsl(120, 100%, 40%);">+DMM -> CIPHER MODE COMMAND MSISDN:42342</span><br><span style="color: hsl(120, 100%, 40%);">+- sending Ciphering Mode Command for MSISDN:42342: include_imeisv=0</span><br><span style="color: hsl(120, 100%, 40%);">+- ...perm algo: A5/3</span><br><span style="color: hsl(120, 100%, 40%);">+- ...key: 07fa7502e07e1c00</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use - dtap == 0 (0x0: )</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(CM_SERVICE_REQ:901700000004620){SUBSCR_CONN_S_AUTH_CIPH}: Received Event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(CM_SERVICE_REQ:901700000004620){SUBSCR_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+  cm_service_result_sent == 0</span><br><span style="color: hsl(120, 100%, 40%);">+  cipher_mode_cmd_sent == 1</span><br><span style="color: hsl(120, 100%, 40%);">+- needs ciph, not yet accepted</span><br><span style="color: hsl(120, 100%, 40%);">+msc_subscr_conn_is_accepted() == false</span><br><span style="color: hsl(120, 100%, 40%);">+  requests shall be thwarted</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message GSM48_MT_CC_SETUP (0x3:0x5)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL subscr MSISDN:42342: Message not permitted for initial conn: GSM48_MT_CC_SETUP</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message unknown 0x33 (0x5:0x33)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL subscr MSISDN:42342: Message not permitted for initial conn: unknown 0x33</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message GSM48_MT_RR_SYSINFO_1 (0x6:0x19)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL subscr MSISDN:42342: Message not permitted for initial conn: GSM48_MT_RR_SYSINFO_1</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message SMS:0x01 (0x9:0x1)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL subscr MSISDN:42342: Message not permitted for initial conn: SMS:0x01</span><br><span style="color: hsl(120, 100%, 40%);">+- MS sends Ciphering Mode Complete, VLR accepts; above Ciphering is an implicit CM Service Accept</span><br><span style="color: hsl(120, 100%, 40%);">+  MSC <--RAN_GERAN_A-- MS: GSM48_MT_RR_CIPH_M_COMPL</span><br><span style="color: hsl(120, 100%, 40%);">+DRR MSISDN:42342: CIPHERING MODE COMPLETE</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_WAIT_CIPH}: Received Event PR_ARQ_E_CIPH_RES</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_node2_post_ciph()</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_node2_post_vlr()</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_post_pres()</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_post_trace()</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_post_imei()</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_WAIT_CIPH}: proc_arq_fsm_done(PASSED)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_WAIT_CIPH}: state_chg to PR_ARQ_S_DONE</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_DONE}: Process Access Request result: PASSED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(CM_SERVICE_REQ:901700000004620){SUBSCR_CONN_S_AUTH_CIPH}: Received Event SUBSCR_CONN_E_ACCEPTED</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use + cm_service == 1 (0x8: cm_service)</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(CM_SERVICE_REQ:901700000004620){SUBSCR_CONN_S_AUTH_CIPH}: state_chg to SUBSCR_CONN_S_ACCEPTED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(CM_SERVICE_REQ:901700000004620){SUBSCR_CONN_S_ACCEPTED}: subscr_conn_fsm_has_active_transactions: still awaiting first request after a CM Service Request</span><br><span style="color: hsl(120, 100%, 40%);">+  cm_service_result_sent == 0</span><br><span style="color: hsl(120, 100%, 40%);">+- Concluding CM Service Request</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use - cm_service == 0 (0x0: )</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(CM_SERVICE_REQ:901700000004620){SUBSCR_CONN_S_ACCEPTED}: Received Event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(CM_SERVICE_REQ:901700000004620){SUBSCR_CONN_S_ACCEPTED}: state_chg to SUBSCR_CONN_S_RELEASING</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use + release == 1 (0x100: release)</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage increases to: 3</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage decreases to: 2</span><br><span style="color: hsl(120, 100%, 40%);">+- BSSAP Clear --RAN_GERAN_A--> MS</span><br><span style="color: hsl(120, 100%, 40%);">+  bssap_clear_sent == 1</span><br><span style="color: hsl(120, 100%, 40%);">+- all requests serviced, conn has been released</span><br><span style="color: hsl(120, 100%, 40%);">+- BSS sends BSSMAP Clear Complete</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use - release == 0 (0x0: )</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(CM_SERVICE_REQ:901700000004620){SUBSCR_CONN_S_RELEASING}: Received Event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(CM_SERVICE_REQ:901700000004620){SUBSCR_CONN_S_RELEASING}: state_chg to SUBSCR_CONN_S_RELEASED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(CM_SERVICE_REQ:901700000004620){SUBSCR_CONN_S_RELEASED}: Terminating (cause = OSMO_FSM_TERM_REGULAR)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_DONE}: Removing from parent Subscr_Conn(CM_SERVICE_REQ:901700000004620)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_DONE}: Freeing instance</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(CM_SERVICE_REQ:901700000004620){PR_ARQ_S_DONE}: Deallocated</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL MSISDN:42342: Freeing subscriber connection</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage decreases to: 1</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(CM_SERVICE_REQ:901700000004620){SUBSCR_CONN_S_RELEASED}: Freeing instance</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(CM_SERVICE_REQ:901700000004620){SUBSCR_CONN_S_RELEASED}: Deallocated</span><br><span style="color: hsl(120, 100%, 40%);">+  llist_count(&net->subscr_conns) == 0</span><br><span style="color: hsl(120, 100%, 40%);">+---</span><br><span style="color: hsl(120, 100%, 40%);">+- an SMS is sent, MS is paged</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage increases to: 2</span><br><span style="color: hsl(120, 100%, 40%);">+  llist_count(&vsub->cs.requests) == 0</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage increases to: 3</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscriber MSISDN:42342 not paged yet, start paging.</span><br><span style="color: hsl(120, 100%, 40%);">+  RAN_GERAN_A sends out paging request to IMSI 901700000004620, TMSI 0xffffffff, LAC 23</span><br><span style="color: hsl(120, 100%, 40%);">+  strcmp(paging_expecting_imsi, imsi) == 0</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage increases to: 4</span><br><span style="color: hsl(120, 100%, 40%);">+  llist_count(&vsub->cs.requests) == 1</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage decreases to: 3</span><br><span style="color: hsl(120, 100%, 40%);">+  paging_sent == 1</span><br><span style="color: hsl(120, 100%, 40%);">+  paging_stopped == 0</span><br><span style="color: hsl(120, 100%, 40%);">+- the subscriber and its pending request should remain</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage increases to: 4</span><br><span style="color: hsl(120, 100%, 40%);">+  llist_count(&vsub->cs.requests) == 1</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage decreases to: 3</span><br><span style="color: hsl(120, 100%, 40%);">+- MS replies with Paging Response, and VLR sends Auth Request with third key</span><br><span style="color: hsl(120, 100%, 40%);">+  MSC <--RAN_GERAN_A-- MS: GSM48_MT_RR_PAG_RESP</span><br><span style="color: hsl(120, 100%, 40%);">+  new conn</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn{SUBSCR_CONN_S_NEW}: Allocated</span><br><span style="color: hsl(120, 100%, 40%);">+DREF unknown: MSC conn use + compl_l3 == 1 (0x1: compl_l3)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message GSM48_MT_RR_PAG_RESP (0x6:0x27)</span><br><span style="color: hsl(120, 100%, 40%);">+DRR PAGING RESPONSE: MI(IMSI)=901700000004620</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_NEW}: Updated ID</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_INIT}: Allocated</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_INIT}: is child of Subscr_Conn(PAGING_RESP:901700000004620)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_INIT}: rev=GSM net=GERAN Auth+Ciph</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_INIT}: Received Event PR_ARQ_E_START</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage increases to: 4</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage increases to: 5</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_INIT}: proc_arq_vlr_fn_post_imsi()</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_INIT}: state_chg to PR_ARQ_S_WAIT_AUTH</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(PAGING_RESP:901700000004620){VLR_SUB_AS_NEEDS_AUTH}: Allocated</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(PAGING_RESP:901700000004620){VLR_SUB_AS_NEEDS_AUTH}: is child of Process_Access_Request_VLR(PAGING_RESP:901700000004620)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(PAGING_RESP:901700000004620){VLR_SUB_AS_NEEDS_AUTH}: Received Event VLR_AUTH_E_START</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(PAGING_RESP:901700000004620){VLR_SUB_AS_NEEDS_AUTH}: state_chg to VLR_SUB_AS_WAIT_RESP</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(PAGING_RESP:901700000004620){VLR_SUB_AS_WAIT_RESP}: got auth tuple: use_count=1 key_seq=2 -- will use GSM AKA (is_r99=no, at->vec.auth_types=0x1)</span><br><span style="color: hsl(120, 100%, 40%);">+- sending GSM Auth Request for MSISDN:42342: tuple use_count=1 key_seq=2 auth_types=0x1 and...</span><br><span style="color: hsl(120, 100%, 40%);">+- ...rand=e7c03ba7cf0e2fde82b2dc4d63077d42</span><br><span style="color: hsl(120, 100%, 40%);">+- ...expecting sres=a29514ae</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage decreases to: 4</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_NEW}: Received Event SUBSCR_CONN_E_COMPLETE_LAYER_3</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_NEW}: state_chg to SUBSCR_CONN_S_AUTH_CIPH</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use - compl_l3 == 0 (0x0: )</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_AUTH_CIPH}: Received Event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+  auth_request_sent == 1</span><br><span style="color: hsl(120, 100%, 40%);">+---</span><br><span style="color: hsl(120, 100%, 40%);">+- Fake a situation where Classmark 2 is unknown during proc_arq_fsm</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage increases to: 5</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage decreases to: 4</span><br><span style="color: hsl(120, 100%, 40%);">+- MS sends Authen Response, VLR accepts and requests Ciphering</span><br><span style="color: hsl(120, 100%, 40%);">+- MS sends Authen Response, VLR accepts and requests Ciphering. Normally, we'd know Classmark 3, but this test removed it. Hence a Classmark Request is generated.</span><br><span style="color: hsl(120, 100%, 40%);">+  MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_AUTH_RESP</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use + dtap == 1 (0x2: dtap)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message GSM48_MT_MM_AUTH_RESP (0x5:0x14)</span><br><span style="color: hsl(120, 100%, 40%);">+DMM MSISDN:42342: MM GSM AUTHENTICATION RESPONSE (sres = a29514ae)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(PAGING_RESP:901700000004620){VLR_SUB_AS_WAIT_RESP}: Received Event VLR_AUTH_E_MS_AUTH_RESP</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR SUBSCR(MSISDN:42342) AUTH on GERAN received SRES/RES: a29514ae (4 bytes)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR SUBSCR(MSISDN:42342) AUTH established GSM security context</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(PAGING_RESP:901700000004620){VLR_SUB_AS_WAIT_RESP}: Authentication terminating with result PASSED</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(PAGING_RESP:901700000004620){VLR_SUB_AS_WAIT_RESP}: state_chg to VLR_SUB_AS_AUTHENTICATED</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(PAGING_RESP:901700000004620){VLR_SUB_AS_AUTHENTICATED}: Terminating (cause = OSMO_FSM_TERM_REGULAR)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(PAGING_RESP:901700000004620){VLR_SUB_AS_AUTHENTICATED}: Removing from parent Process_Access_Request_VLR(PAGING_RESP:901700000004620)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(PAGING_RESP:901700000004620){VLR_SUB_AS_AUTHENTICATED}: Freeing instance</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(PAGING_RESP:901700000004620){VLR_SUB_AS_AUTHENTICATED}: Deallocated</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_WAIT_AUTH}: Received Event PR_ARQ_E_AUTH_RES</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_WAIT_AUTH}: _proc_arq_vlr_node2()</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_WAIT_AUTH}: Set Ciphering Mode</span><br><span style="color: hsl(120, 100%, 40%);">+DMM MSISDN:42342: to determine whether A5/3 is supported, first ask for a Classmark Update to obtain Classmark 2</span><br><span style="color: hsl(120, 100%, 40%);">+  BSC <--BSSAP-BSS-MANAGEMENT-- MSC: CLASSMARK REQ [L3]> 00 01 58 </span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_AUTH_CIPH}: state_chg to SUBSCR_CONN_S_WAIT_CLASSMARK_UPDATE</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_WAIT_AUTH}: state_chg to PR_ARQ_S_WAIT_CIPH</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use - dtap == 0 (0x0: )</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_WAIT_CLASSMARK_UPDATE}: Received Event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_WAIT_CLASSMARK_UPDATE}: Awaiting results for Auth+Ciph, overruling event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+- BSC sends back a BSSMAP Classmark Update, that triggers the Ciphering Mode Command in A5/3</span><br><span style="color: hsl(120, 100%, 40%);">+DMSC Looking for A subscriber: conn_id 0</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_WAIT_CLASSMARK_UPDATE}: Received Event SUBSCR_CONN_E_CLASSMARK_UPDATE</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_WAIT_CLASSMARK_UPDATE}: state_chg to SUBSCR_CONN_S_AUTH_CIPH</span><br><span style="color: hsl(120, 100%, 40%);">+DMM -> CIPHER MODE COMMAND MSISDN:42342</span><br><span style="color: hsl(120, 100%, 40%);">+- sending Ciphering Mode Command for MSISDN:42342: include_imeisv=0</span><br><span style="color: hsl(120, 100%, 40%);">+- ...perm algo: A5/3</span><br><span style="color: hsl(120, 100%, 40%);">+- ...key: e2b234f807886400</span><br><span style="color: hsl(120, 100%, 40%);">+- needs ciph, not yet accepted</span><br><span style="color: hsl(120, 100%, 40%);">+msc_subscr_conn_is_accepted() == false</span><br><span style="color: hsl(120, 100%, 40%);">+- MS sends Ciphering Mode Complete, VLR accepts and sends pending SMS</span><br><span style="color: hsl(120, 100%, 40%);">+  MSC <--RAN_GERAN_A-- MS: GSM48_MT_RR_CIPH_M_COMPL</span><br><span style="color: hsl(120, 100%, 40%);">+DRR MSISDN:42342: CIPHERING MODE COMPLETE</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_WAIT_CIPH}: Received Event PR_ARQ_E_CIPH_RES</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_node2_post_ciph()</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_node2_post_vlr()</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_post_pres()</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_post_trace()</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_WAIT_CIPH}: _proc_arq_vlr_post_imei()</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_WAIT_CIPH}: proc_arq_fsm_done(PASSED)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_WAIT_CIPH}: state_chg to PR_ARQ_S_DONE</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_DONE}: Process Access Request result: PASSED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_AUTH_CIPH}: Received Event SUBSCR_CONN_E_ACCEPTED</span><br><span style="color: hsl(120, 100%, 40%);">+DPAG Paging success for MSISDN:42342 (event=0)</span><br><span style="color: hsl(120, 100%, 40%);">+DPAG Calling paging cbfn.</span><br><span style="color: hsl(120, 100%, 40%);">+DCC (ti 00 sub MSISDN:42342 callref 40000005) New transaction</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage increases to: 5</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use + trans_sms == 1 (0x20: trans_sms)</span><br><span style="color: hsl(120, 100%, 40%);">+DMSC msc_tx 91 bytes to MSISDN:42342 via RAN_GERAN_A</span><br><span style="color: hsl(120, 100%, 40%);">+- DTAP --RAN_GERAN_A--> MS: SMS:0x01: 09015801000791447758100650004c0005802443f2000007101000000000445079da1e1ee7416937485e9ea7c965373d1d6683c270383b3d0ed3d36ff71c949e83c22072799e9687c5ec32a81d96afcbf4b4fb0c7ac3e9e9b7db05</span><br><span style="color: hsl(120, 100%, 40%);">+- DTAP matches expected message</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage decreases to: 4</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_AUTH_CIPH}: state_chg to SUBSCR_CONN_S_ACCEPTED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_ACCEPTED}: subscr_conn_fsm_has_active_transactions: connection still has active transaction: SMS</span><br><span style="color: hsl(120, 100%, 40%);">+  dtap_tx_confirmed == 1</span><br><span style="color: hsl(120, 100%, 40%);">+  paging_stopped == 1</span><br><span style="color: hsl(120, 100%, 40%);">+- SMS was delivered, no requests pending for subscr</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage increases to: 5</span><br><span style="color: hsl(120, 100%, 40%);">+  llist_count(&vsub->cs.requests) == 0</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage decreases to: 4</span><br><span style="color: hsl(120, 100%, 40%);">+- conn is still open to wait for SMS ack dance</span><br><span style="color: hsl(120, 100%, 40%);">+  llist_count(&net->subscr_conns) == 1</span><br><span style="color: hsl(120, 100%, 40%);">+- MS replies with CP-ACK for received SMS</span><br><span style="color: hsl(120, 100%, 40%);">+  MSC <--RAN_GERAN_A-- MS: SMS:0x04</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use + dtap == 2 (0x22: dtap,trans_sms)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message SMS:0x04 (0x9:0x4)</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_ACCEPTED}: Received Event SUBSCR_CONN_E_COMMUNICATING</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_ACCEPTED}: state_chg to SUBSCR_CONN_S_COMMUNICATING</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use - dtap == 1 (0x20: trans_sms)</span><br><span style="color: hsl(120, 100%, 40%);">+  llist_count(&net->subscr_conns) == 1</span><br><span style="color: hsl(120, 100%, 40%);">+- MS also sends RP-ACK, MSC in turn sends CP-ACK for that</span><br><span style="color: hsl(120, 100%, 40%);">+  MSC <--RAN_GERAN_A-- MS: SMS:0x01</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use + dtap == 2 (0x22: dtap,trans_sms)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message SMS:0x01 (0x9:0x1)</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_COMMUNICATING</span><br><span style="color: hsl(120, 100%, 40%);">+DMSC msc_tx 2 bytes to MSISDN:42342 via RAN_GERAN_A</span><br><span style="color: hsl(120, 100%, 40%);">+- DTAP --RAN_GERAN_A--> MS: SMS:0x04: 0904</span><br><span style="color: hsl(120, 100%, 40%);">+- DTAP matches expected message</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage decreases to: 3</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage decreases to: 2</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use - trans_sms == 1 (0x2: dtap)</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use - dtap == 0 (0x0: )</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_COMMUNICATING}: Received Event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_COMMUNICATING}: state_chg to SUBSCR_CONN_S_RELEASING</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use + release == 1 (0x100: release)</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage increases to: 3</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage decreases to: 2</span><br><span style="color: hsl(120, 100%, 40%);">+- BSSAP Clear --RAN_GERAN_A--> MS</span><br><span style="color: hsl(120, 100%, 40%);">+  dtap_tx_confirmed == 1</span><br><span style="color: hsl(120, 100%, 40%);">+  bssap_clear_sent == 1</span><br><span style="color: hsl(120, 100%, 40%);">+- SMS is done, conn is gone</span><br><span style="color: hsl(120, 100%, 40%);">+- BSS sends BSSMAP Clear Complete</span><br><span style="color: hsl(120, 100%, 40%);">+DREF MSISDN:42342: MSC conn use - release == 0 (0x0: )</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_RELEASING}: Received Event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_RELEASING}: state_chg to SUBSCR_CONN_S_RELEASED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_RELEASED}: Terminating (cause = OSMO_FSM_TERM_REGULAR)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_DONE}: Removing from parent Subscr_Conn(PAGING_RESP:901700000004620)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_DONE}: Freeing instance</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR Process_Access_Request_VLR(PAGING_RESP:901700000004620){PR_ARQ_S_DONE}: Deallocated</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL MSISDN:42342: Freeing subscriber connection</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage decreases to: 1</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_RELEASED}: Freeing instance</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(PAGING_RESP:901700000004620){SUBSCR_CONN_S_RELEASED}: Deallocated</span><br><span style="color: hsl(120, 100%, 40%);">+  llist_count(&net->subscr_conns) == 0</span><br><span style="color: hsl(120, 100%, 40%);">+---</span><br><span style="color: hsl(120, 100%, 40%);">+- subscriber detaches</span><br><span style="color: hsl(120, 100%, 40%);">+  MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_IMSI_DETACH_IND</span><br><span style="color: hsl(120, 100%, 40%);">+  new conn</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn{SUBSCR_CONN_S_NEW}: Allocated</span><br><span style="color: hsl(120, 100%, 40%);">+DREF unknown: MSC conn use + compl_l3 == 1 (0x1: compl_l3)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message GSM48_MT_MM_IMSI_DETACH_IND (0x5:0x1)</span><br><span style="color: hsl(120, 100%, 40%);">+DMM IMSI DETACH INDICATION: MI(IMSI)=901700000004620</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage increases to: 2</span><br><span style="color: hsl(120, 100%, 40%);">+DMM IMSI DETACH for MSISDN:42342</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage increases to: 3</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage decreases to: 2</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage decreases to: 1</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr MSISDN:42342 usage decreases to: 0</span><br><span style="color: hsl(120, 100%, 40%);">+DREF freeing VLR subscr MSISDN:42342</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn{SUBSCR_CONN_S_NEW}: Received Event SUBSCR_CONN_E_CN_CLOSE</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn{SUBSCR_CONN_S_NEW}: state_chg to SUBSCR_CONN_S_RELEASING</span><br><span style="color: hsl(120, 100%, 40%);">+DREF unknown: MSC conn use + release == 2 (0x101: compl_l3,release)</span><br><span style="color: hsl(120, 100%, 40%);">+- BSSAP Clear --RAN_GERAN_A--> MS</span><br><span style="color: hsl(120, 100%, 40%);">+DREF unknown: MSC conn use - compl_l3 == 1 (0x100: release)</span><br><span style="color: hsl(120, 100%, 40%);">+  bssap_clear_sent == 1</span><br><span style="color: hsl(120, 100%, 40%);">+- BSS sends BSSMAP Clear Complete</span><br><span style="color: hsl(120, 100%, 40%);">+DREF unknown: MSC conn use - release == 0 (0x0: )</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn{SUBSCR_CONN_S_RELEASING}: Received Event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn{SUBSCR_CONN_S_RELEASING}: state_chg to SUBSCR_CONN_S_RELEASED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn{SUBSCR_CONN_S_RELEASED}: Terminating (cause = OSMO_FSM_TERM_REGULAR)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Freeing subscriber connection with NULL subscriber</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn{SUBSCR_CONN_S_RELEASED}: Freeing instance</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn{SUBSCR_CONN_S_RELEASED}: Deallocated</span><br><span style="color: hsl(120, 100%, 40%);">+  llist_count(&net->subscr_conns) == 0</span><br><span style="color: hsl(120, 100%, 40%);">+===== test_cm_service_needs_classmark_update: SUCCESS</span><br><span> </span><br><span> full talloc report on 'msgb' (total      0 bytes in   1 blocks)</span><br><span> talloc_total_blocks(tall_bsc_ctx) == 12</span><br><span>diff --git a/tests/msc_vlr/msc_vlr_test_ms_timeout.c b/tests/msc_vlr/msc_vlr_test_ms_timeout.c</span><br><span>index c5ab059..ddb6324 100644</span><br><span>--- a/tests/msc_vlr/msc_vlr_test_ms_timeout.c</span><br><span>+++ b/tests/msc_vlr/msc_vlr_test_ms_timeout.c</span><br><span>@@ -292,9 +292,79 @@</span><br><span>      comment_end();</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+static void test_classmark_update_timeout()</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+       comment_start();</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+    fake_time_start();</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+  /* implicit: net->authentication_required = true; */</span><br><span style="color: hsl(120, 100%, 40%);">+       net->a5_encryption_mask = (1 << 3); /* A5/3 */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+     btw("Location Update request causes a GSUP Send Auth Info request to HLR");</span><br><span style="color: hsl(120, 100%, 40%);">+ lu_result_sent = RES_NONE;</span><br><span style="color: hsl(120, 100%, 40%);">+    gsup_expect_tx("08010809710000004026f0");</span><br><span style="color: hsl(120, 100%, 40%);">+   ms_sends_msg("050802008168000130089910070000006402");</span><br><span style="color: hsl(120, 100%, 40%);">+       OSMO_ASSERT(gsup_tx_confirmed);</span><br><span style="color: hsl(120, 100%, 40%);">+       VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        btw("from HLR, rx _SEND_AUTH_INFO_RESULT; VLR sends Auth Req to MS");</span><br><span style="color: hsl(120, 100%, 40%);">+       /* Based on a Ki of 000102030405060708090a0b0c0d0e0f */</span><br><span style="color: hsl(120, 100%, 40%);">+       auth_request_sent = false;</span><br><span style="color: hsl(120, 100%, 40%);">+    auth_request_expect_rand = "585df1ae287f6e273dce07090d61320b";</span><br><span style="color: hsl(120, 100%, 40%);">+      auth_request_expect_autn = NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+      gsup_rx("0a"</span><br><span style="color: hsl(120, 100%, 40%);">+                /* imsi */</span><br><span style="color: hsl(120, 100%, 40%);">+            "0108" "09710000004026f0"</span><br><span style="color: hsl(120, 100%, 40%);">+         /* TL    TL     rand */</span><br><span style="color: hsl(120, 100%, 40%);">+               "0322"  "2010" "585df1ae287f6e273dce07090d61320b"</span><br><span style="color: hsl(120, 100%, 40%);">+               /*       TL     sres       TL     kc */</span><br><span style="color: hsl(120, 100%, 40%);">+                       "2104" "2d8b2c3e" "2208" "61855fb81fc2a800"</span><br><span style="color: hsl(120, 100%, 40%);">+           ,</span><br><span style="color: hsl(120, 100%, 40%);">+             NULL);</span><br><span style="color: hsl(120, 100%, 40%);">+        VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+  VERBOSE_ASSERT(auth_request_sent, == true, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ BTW("MS sends Authen Response, VLR accepts and wants to send Ciphering Mode Command to MS"</span><br><span style="color: hsl(120, 100%, 40%);">+      " -- but needs Classmark 2 to determine whether A5/3 is supported");</span><br><span style="color: hsl(120, 100%, 40%);">+    cipher_mode_cmd_sent = false;</span><br><span style="color: hsl(120, 100%, 40%);">+ ms_sends_msg("05542d8b2c3e");</span><br><span style="color: hsl(120, 100%, 40%);">+       OSMO_ASSERT(!cipher_mode_cmd_sent);</span><br><span style="color: hsl(120, 100%, 40%);">+   VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+        BTW("But the BSSMAP Classmark Update never arrives");</span><br><span style="color: hsl(120, 100%, 40%);">+       btw("At first, we're still waiting");</span><br><span style="color: hsl(120, 100%, 40%);">+   fake_time_passes(0, 423);</span><br><span style="color: hsl(120, 100%, 40%);">+     EXPECT_CONN_COUNT(1);</span><br><span style="color: hsl(120, 100%, 40%);">+ VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+  fake_time_passes(1, 235);</span><br><span style="color: hsl(120, 100%, 40%);">+     EXPECT_CONN_COUNT(1);</span><br><span style="color: hsl(120, 100%, 40%);">+ VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+  fake_time_passes(1, 235);</span><br><span style="color: hsl(120, 100%, 40%);">+     EXPECT_CONN_COUNT(1);</span><br><span style="color: hsl(120, 100%, 40%);">+ VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+  fake_time_passes(1, 235);</span><br><span style="color: hsl(120, 100%, 40%);">+     EXPECT_CONN_COUNT(1);</span><br><span style="color: hsl(120, 100%, 40%);">+ VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+  fake_time_passes(1, 235);</span><br><span style="color: hsl(120, 100%, 40%);">+     EXPECT_CONN_COUNT(1);</span><br><span style="color: hsl(120, 100%, 40%);">+ VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+  expect_bssap_clear();</span><br><span style="color: hsl(120, 100%, 40%);">+ fake_time_passes(1, 235);</span><br><span style="color: hsl(120, 100%, 40%);">+     btw("SUBSCR_CONN_TIMEOUT has passed, conn is gone.");</span><br><span style="color: hsl(120, 100%, 40%);">+       VERBOSE_ASSERT(bssap_clear_sent, == true, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+    bss_sends_clear_complete();</span><br><span style="color: hsl(120, 100%, 40%);">+   EXPECT_CONN_COUNT(0);</span><br><span style="color: hsl(120, 100%, 40%);">+ VERBOSE_ASSERT(lu_result_sent, == RES_REJECT, "%d");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      comment_end();</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> msc_vlr_test_func_t msc_vlr_tests[] = {</span><br><span>     test_ms_timeout_lu_auth_resp,</span><br><span>        test_ms_timeout_cm_auth_resp,</span><br><span>        test_ms_timeout_paging,</span><br><span style="color: hsl(120, 100%, 40%);">+       test_classmark_update_timeout,</span><br><span>       NULL</span><br><span> };</span><br><span>diff --git a/tests/msc_vlr/msc_vlr_test_ms_timeout.err b/tests/msc_vlr/msc_vlr_test_ms_timeout.err</span><br><span>index eb40a97..43eb3d4 100644</span><br><span>--- a/tests/msc_vlr/msc_vlr_test_ms_timeout.err</span><br><span>+++ b/tests/msc_vlr/msc_vlr_test_ms_timeout.err</span><br><span>@@ -554,6 +554,136 @@</span><br><span> full talloc report on 'msgb' (total      0 bytes in   1 blocks)</span><br><span> talloc_total_blocks(tall_bsc_ctx) == 12</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+===== test_classmark_update_timeout</span><br><span style="color: hsl(120, 100%, 40%);">+- Total time passed: 0.000000 s</span><br><span style="color: hsl(120, 100%, 40%);">+- Location Update request causes a GSUP Send Auth Info request to HLR</span><br><span style="color: hsl(120, 100%, 40%);">+  MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_LOC_UPD_REQUEST</span><br><span style="color: hsl(120, 100%, 40%);">+  new conn</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn{SUBSCR_CONN_S_NEW}: Allocated</span><br><span style="color: hsl(120, 100%, 40%);">+DREF unknown: MSC conn use + compl_l3 == 1 (0x1: compl_l3)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message GSM48_MT_MM_LOC_UPD_REQUEST (0x5:0x8)</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_NEW}: Updated ID</span><br><span style="color: hsl(120, 100%, 40%);">+DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000004620 type=IMSI ATTACH</span><br><span style="color: hsl(120, 100%, 40%);">+DMM LU/new-LAC: 1/23</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_IDLE}: Allocated</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_IDLE}: is child of Subscr_Conn(LU:901700000004620)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_IDLE}: rev=GSM net=GERAN Auth+Ciph</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_IDLE}: Received Event VLR_ULA_E_UPDATE_LA</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr unknown usage increases to: 1</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR set IMSI on subscriber; IMSI=901700000004620 id=901700000004620</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR New subscr, IMSI: 901700000004620</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr IMSI:901700000004620 usage increases to: 2</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr IMSI:901700000004620 usage decreases to: 1</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_IDLE}: vlr_loc_upd_node1()</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_AUTH</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(LU:901700000004620){VLR_SUB_AS_NEEDS_AUTH}: Allocated</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(LU:901700000004620){VLR_SUB_AS_NEEDS_AUTH}: is child of vlr_lu_fsm(LU:901700000004620)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(LU:901700000004620){VLR_SUB_AS_NEEDS_AUTH}: Received Event VLR_AUTH_E_START</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR GSUP tx: 08010809710000004026f0</span><br><span style="color: hsl(120, 100%, 40%);">+GSUP --> HLR: OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST: 08010809710000004026f0</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(LU:901700000004620){VLR_SUB_AS_NEEDS_AUTH}: state_chg to VLR_SUB_AS_NEEDS_AUTH_WAIT_AI</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_NEW}: Received Event SUBSCR_CONN_E_COMPLETE_LAYER_3</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_NEW}: state_chg to SUBSCR_CONN_S_AUTH_CIPH</span><br><span style="color: hsl(120, 100%, 40%);">+DREF IMSI:901700000004620: MSC conn use - compl_l3 == 0 (0x0: )</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_AUTH_CIPH}: Received Event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_AUTH_CIPH}: Awaiting results for Auth+Ciph, overruling event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+  lu_result_sent == 0</span><br><span style="color: hsl(120, 100%, 40%);">+- from HLR, rx _SEND_AUTH_INFO_RESULT; VLR sends Auth Req to MS</span><br><span style="color: hsl(120, 100%, 40%);">+<-- GSUP rx OSMO_GSUP_MSGT_SEND_AUTH_INFO_RESULT: 0a010809710000004026f003222010585df1ae287f6e273dce07090d61320b21042d8b2c3e220861855fb81fc2a800</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR GSUP rx 47: 0a010809710000004026f003222010585df1ae287f6e273dce07090d61320b21042d8b2c3e220861855fb81fc2a800</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr IMSI:901700000004620 usage increases to: 2</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(LU:901700000004620){VLR_SUB_AS_NEEDS_AUTH_WAIT_AI}: Received Event VLR_AUTH_E_HLR_SAI_ACK</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR SUBSCR(IMSI:901700000004620) Received 1 auth tuples</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(LU:901700000004620){VLR_SUB_AS_NEEDS_AUTH_WAIT_AI}: state_chg to VLR_SUB_AS_WAIT_RESP</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(LU:901700000004620){VLR_SUB_AS_WAIT_RESP}: got auth tuple: use_count=1 key_seq=0 -- will use GSM AKA (is_r99=no, at->vec.auth_types=0x1)</span><br><span style="color: hsl(120, 100%, 40%);">+- sending GSM Auth Request for IMSI:901700000004620: tuple use_count=1 key_seq=0 auth_types=0x1 and...</span><br><span style="color: hsl(120, 100%, 40%);">+- ...rand=585df1ae287f6e273dce07090d61320b</span><br><span style="color: hsl(120, 100%, 40%);">+- ...expecting sres=2d8b2c3e</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr IMSI:901700000004620 usage decreases to: 1</span><br><span style="color: hsl(120, 100%, 40%);">+<-- GSUP rx OSMO_GSUP_MSGT_SEND_AUTH_INFO_RESULT: vlr_gsupc_read_cb() returns 0</span><br><span style="color: hsl(120, 100%, 40%);">+  lu_result_sent == 0</span><br><span style="color: hsl(120, 100%, 40%);">+  auth_request_sent == 1</span><br><span style="color: hsl(120, 100%, 40%);">+---</span><br><span style="color: hsl(120, 100%, 40%);">+- MS sends Authen Response, VLR accepts and wants to send Ciphering Mode Command to MS -- but needs Classmark 2 to determine whether A5/3 is supported</span><br><span style="color: hsl(120, 100%, 40%);">+  MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_AUTH_RESP</span><br><span style="color: hsl(120, 100%, 40%);">+DREF IMSI:901700000004620: MSC conn use + dtap == 1 (0x2: dtap)</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL Dispatching 04.08 message GSM48_MT_MM_AUTH_RESP (0x5:0x14)</span><br><span style="color: hsl(120, 100%, 40%);">+DMM IMSI:901700000004620: MM GSM AUTHENTICATION RESPONSE (sres = 2d8b2c3e)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(LU:901700000004620){VLR_SUB_AS_WAIT_RESP}: Received Event VLR_AUTH_E_MS_AUTH_RESP</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR SUBSCR(IMSI:901700000004620) AUTH on GERAN received SRES/RES: 2d8b2c3e (4 bytes)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR SUBSCR(IMSI:901700000004620) AUTH established GSM security context</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(LU:901700000004620){VLR_SUB_AS_WAIT_RESP}: Authentication terminating with result PASSED</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(LU:901700000004620){VLR_SUB_AS_WAIT_RESP}: state_chg to VLR_SUB_AS_AUTHENTICATED</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(LU:901700000004620){VLR_SUB_AS_AUTHENTICATED}: Terminating (cause = OSMO_FSM_TERM_REGULAR)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(LU:901700000004620){VLR_SUB_AS_AUTHENTICATED}: Removing from parent vlr_lu_fsm(LU:901700000004620)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(LU:901700000004620){VLR_SUB_AS_AUTHENTICATED}: Freeing instance</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR VLR_Authenticate(LU:901700000004620){VLR_SUB_AS_AUTHENTICATED}: Deallocated</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_AUTH}: Received Event VLR_ULA_E_AUTH_RES</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_AUTH}: vlr_loc_upd_post_auth()</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_AUTH}: Set Ciphering Mode</span><br><span style="color: hsl(120, 100%, 40%);">+DMM IMSI:901700000004620: to determine whether A5/3 is supported, first ask for a Classmark Update to obtain Classmark 2</span><br><span style="color: hsl(120, 100%, 40%);">+  BSC <--BSSAP-BSS-MANAGEMENT-- MSC: CLASSMARK REQ [L3]> 00 01 58 </span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_AUTH_CIPH}: state_chg to SUBSCR_CONN_S_WAIT_CLASSMARK_UPDATE</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_AUTH}: state_chg to VLR_ULA_S_WAIT_CIPH</span><br><span style="color: hsl(120, 100%, 40%);">+DREF IMSI:901700000004620: MSC conn use - dtap == 0 (0x0: )</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_WAIT_CLASSMARK_UPDATE}: Received Event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_WAIT_CLASSMARK_UPDATE}: Awaiting results for Auth+Ciph, overruling event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+  lu_result_sent == 0</span><br><span style="color: hsl(120, 100%, 40%);">+---</span><br><span style="color: hsl(120, 100%, 40%);">+- But the BSSMAP Classmark Update never arrives</span><br><span style="color: hsl(120, 100%, 40%);">+- At first, we're still waiting</span><br><span style="color: hsl(120, 100%, 40%);">+- Total time passed: 0.000423 s</span><br><span style="color: hsl(120, 100%, 40%);">+  llist_count(&net->subscr_conns) == 1</span><br><span style="color: hsl(120, 100%, 40%);">+  lu_result_sent == 0</span><br><span style="color: hsl(120, 100%, 40%);">+- Total time passed: 1.000658 s</span><br><span style="color: hsl(120, 100%, 40%);">+  llist_count(&net->subscr_conns) == 1</span><br><span style="color: hsl(120, 100%, 40%);">+  lu_result_sent == 0</span><br><span style="color: hsl(120, 100%, 40%);">+- Total time passed: 2.000893 s</span><br><span style="color: hsl(120, 100%, 40%);">+  llist_count(&net->subscr_conns) == 1</span><br><span style="color: hsl(120, 100%, 40%);">+  lu_result_sent == 0</span><br><span style="color: hsl(120, 100%, 40%);">+- Total time passed: 3.001128 s</span><br><span style="color: hsl(120, 100%, 40%);">+  llist_count(&net->subscr_conns) == 1</span><br><span style="color: hsl(120, 100%, 40%);">+  lu_result_sent == 0</span><br><span style="color: hsl(120, 100%, 40%);">+- Total time passed: 4.001363 s</span><br><span style="color: hsl(120, 100%, 40%);">+  llist_count(&net->subscr_conns) == 1</span><br><span style="color: hsl(120, 100%, 40%);">+  lu_result_sent == 0</span><br><span style="color: hsl(120, 100%, 40%);">+- Total time passed: 5.001598 s</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_WAIT_CLASSMARK_UPDATE}: Timeout of T0</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_WAIT_CLASSMARK_UPDATE}: Received Event SUBSCR_CONN_E_CN_CLOSE</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_WAIT_CLASSMARK_UPDATE}: Close event, cause: CONGESTION</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_WAIT_CLASSMARK_UPDATE}: state_chg to SUBSCR_CONN_S_RELEASING</span><br><span style="color: hsl(120, 100%, 40%);">+DREF IMSI:901700000004620: MSC conn use + release == 1 (0x100: release)</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr IMSI:901700000004620 usage increases to: 2</span><br><span style="color: hsl(120, 100%, 40%);">+- sending LU Reject for IMSI:901700000004620, cause 22</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_WAIT_CIPH}: state_chg to VLR_ULA_S_DONE</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_RELEASING}: Received Event SUBSCR_CONN_E_CN_CLOSE</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_RELEASING}: Event SUBSCR_CONN_E_CN_CLOSE not permitted</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr IMSI:901700000004620 usage decreases to: 1</span><br><span style="color: hsl(120, 100%, 40%);">+- BSSAP Clear --RAN_GERAN_A--> MS</span><br><span style="color: hsl(120, 100%, 40%);">+- SUBSCR_CONN_TIMEOUT has passed, conn is gone.</span><br><span style="color: hsl(120, 100%, 40%);">+  bssap_clear_sent == 1</span><br><span style="color: hsl(120, 100%, 40%);">+- BSS sends BSSMAP Clear Complete</span><br><span style="color: hsl(120, 100%, 40%);">+DREF IMSI:901700000004620: MSC conn use - release == 0 (0x0: )</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_RELEASING}: Received Event SUBSCR_CONN_E_UNUSED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_RELEASING}: state_chg to SUBSCR_CONN_S_RELEASED</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_RELEASED}: Terminating (cause = OSMO_FSM_TERM_REGULAR)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_DONE}: Removing from parent Subscr_Conn(LU:901700000004620)</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_DONE}: fsm_lu_cleanup called with cause OSMO_FSM_TERM_PARENT</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_DONE}: Freeing instance</span><br><span style="color: hsl(120, 100%, 40%);">+DVLR vlr_lu_fsm(LU:901700000004620){VLR_ULA_S_DONE}: Deallocated</span><br><span style="color: hsl(120, 100%, 40%);">+DRLL IMSI:901700000004620: Freeing subscriber connection</span><br><span style="color: hsl(120, 100%, 40%);">+DREF VLR subscr IMSI:901700000004620 usage decreases to: 0</span><br><span style="color: hsl(120, 100%, 40%);">+DREF freeing VLR subscr IMSI:901700000004620</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_RELEASED}: Freeing instance</span><br><span style="color: hsl(120, 100%, 40%);">+DMM Subscr_Conn(LU:901700000004620){SUBSCR_CONN_S_RELEASED}: Deallocated</span><br><span style="color: hsl(120, 100%, 40%);">+  llist_count(&net->subscr_conns) == 0</span><br><span style="color: hsl(120, 100%, 40%);">+  lu_result_sent == 2</span><br><span style="color: hsl(120, 100%, 40%);">+===== test_classmark_update_timeout: SUCCESS</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+full talloc report on 'msgb' (total      0 bytes in   1 blocks)</span><br><span style="color: hsl(120, 100%, 40%);">+talloc_total_blocks(tall_bsc_ctx) == 12</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> full talloc report on 'msgb' (total      0 bytes in   1 blocks)</span><br><span> talloc_total_blocks(tall_bsc_ctx) == 12</span><br><span> </span><br><span>diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c</span><br><span>index bf1b200..1192cf2 100644</span><br><span>--- a/tests/msc_vlr/msc_vlr_tests.c</span><br><span>+++ b/tests/msc_vlr/msc_vlr_tests.c</span><br><span>@@ -35,6 +35,7 @@</span><br><span> #include <osmocom/msc/debug.h></span><br><span> #include <osmocom/msc/gsm_04_08.h></span><br><span> #include <osmocom/msc/transaction.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <osmocom/msc/a_iface_bssap.h></span><br><span> </span><br><span> #if BUILD_IU</span><br><span> #include <osmocom/msc/iucs_ranap.h></span><br><span>@@ -111,10 +112,10 @@</span><br><span> </span><br><span> struct msgb *msgb_from_hex(const char *label, uint16_t size, const char *hex)</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">-        struct msgb *msg = msgb_alloc(size, label);</span><br><span style="color: hsl(120, 100%, 40%);">+   struct msgb *msg = msgb_alloc_headroom(size, 4, label);</span><br><span>      unsigned char *rc;</span><br><span style="color: hsl(0, 100%, 40%);">-      msg->l2h = msg->head;</span><br><span style="color: hsl(0, 100%, 40%);">-     rc = msgb_put(msg, osmo_hexparse(hex, msg->head, msgb_tailroom(msg)));</span><br><span style="color: hsl(120, 100%, 40%);">+     msg->l2h = msg->data;</span><br><span style="color: hsl(120, 100%, 40%);">+   rc = msgb_put(msg, osmo_hexparse(hex, msg->data, msgb_tailroom(msg)));</span><br><span>    OSMO_ASSERT(rc == msg->l2h);</span><br><span>      return msg;</span><br><span> }</span><br><span>@@ -240,7 +241,32 @@</span><br><span>      msg = msgb_from_hex("ms_sends_msg", 1024, hex);</span><br><span>    msg->l1h = msg->l2h = msg->l3h = msg->data;</span><br><span>      rx_from_ms(msg);</span><br><span style="color: hsl(0, 100%, 40%);">-        talloc_free(msg);</span><br><span style="color: hsl(120, 100%, 40%);">+     msgb_free(msg);</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+void bss_sends_bssap_mgmt(const char *hex)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+   struct msgb *msg;</span><br><span style="color: hsl(120, 100%, 40%);">+     struct bssmap_header *bh;</span><br><span style="color: hsl(120, 100%, 40%);">+     struct a_conn_info a_conn_info;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+     msg = msgb_from_hex("bss_sends_bssap_mgmt", 1024, hex);</span><br><span style="color: hsl(120, 100%, 40%);">+     msg->l3h = msg->data;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ msg->l2h = msgb_push(msg, sizeof(*bh));</span><br><span style="color: hsl(120, 100%, 40%);">+    bh = (void*)msg->l2h;</span><br><span style="color: hsl(120, 100%, 40%);">+      bh->type = BSSAP_MSG_BSS_MANAGEMENT;</span><br><span style="color: hsl(120, 100%, 40%);">+       bh->length = msgb_l3len(msg);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+    if (g_conn && !conn_exists(g_conn))</span><br><span style="color: hsl(120, 100%, 40%);">+           g_conn = NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+      OSMO_ASSERT(g_conn);</span><br><span style="color: hsl(120, 100%, 40%);">+  a_conn_info.network = net;</span><br><span style="color: hsl(120, 100%, 40%);">+    a_conn_info.conn_id = g_conn->a.conn_id;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ a_sccp_rx_dt((struct osmo_sccp_user*)0x1, &a_conn_info, msg);</span><br><span style="color: hsl(120, 100%, 40%);">+     msgb_free(msg);</span><br><span> }</span><br><span> </span><br><span> static int ms_sends_msg_fake(uint8_t pdisc, uint8_t msg_type)</span><br><span>@@ -363,6 +389,33 @@</span><br><span>     paging_stopped = true;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/* override, requires '-Wl,--wrap=osmo_sccp_tx_data_msg' */</span><br><span style="color: hsl(120, 100%, 40%);">+int __real_osmo_sccp_tx_data_msg(struct osmo_sccp_user *scu, uint32_t conn_id,</span><br><span style="color: hsl(120, 100%, 40%);">+                                 struct msgb *msg);</span><br><span style="color: hsl(120, 100%, 40%);">+int __wrap_osmo_sccp_tx_data_msg(struct osmo_sccp_user *scu, uint32_t conn_id,</span><br><span style="color: hsl(120, 100%, 40%);">+                            struct msgb *msg)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+ const char *proto_str;</span><br><span style="color: hsl(120, 100%, 40%);">+        const char *msg_str = gsm0808_bssmap_name(msg->l3h[2]);</span><br><span style="color: hsl(120, 100%, 40%);">+    switch (*msg->l3h) {</span><br><span style="color: hsl(120, 100%, 40%);">+       case BSSAP_MSG_BSS_MANAGEMENT:</span><br><span style="color: hsl(120, 100%, 40%);">+                proto_str = "BSSAP-BSS-MANAGEMENT";</span><br><span style="color: hsl(120, 100%, 40%);">+         break;</span><br><span style="color: hsl(120, 100%, 40%);">+        case BSSAP_MSG_DTAP:</span><br><span style="color: hsl(120, 100%, 40%);">+          proto_str = "BSSAP-DTAP";</span><br><span style="color: hsl(120, 100%, 40%);">+           break;</span><br><span style="color: hsl(120, 100%, 40%);">+        default:</span><br><span style="color: hsl(120, 100%, 40%);">+              proto_str = "";</span><br><span style="color: hsl(120, 100%, 40%);">+             msg_str = "";</span><br><span style="color: hsl(120, 100%, 40%);">+               break;</span><br><span style="color: hsl(120, 100%, 40%);">+        }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   log("BSC <--%s-- MSC: %s %s", proto_str, msg_str, msgb_hexdump(msg));</span><br><span style="color: hsl(120, 100%, 40%);">+    msgb_free(msg);</span><br><span style="color: hsl(120, 100%, 40%);">+       return 0;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> void clear_vlr()</span><br><span> {</span><br><span>      struct vlr_subscr *vsub, *n;</span><br><span>diff --git a/tests/msc_vlr/msc_vlr_tests.h b/tests/msc_vlr/msc_vlr_tests.h</span><br><span>index 4ca05d2..cc200bd 100644</span><br><span>--- a/tests/msc_vlr/msc_vlr_tests.h</span><br><span>+++ b/tests/msc_vlr/msc_vlr_tests.h</span><br><span>@@ -161,6 +161,7 @@</span><br><span> void paging_expect_imsi(const char *imsi);</span><br><span> void paging_expect_tmsi(uint32_t tmsi);</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+void bss_sends_bssap_mgmt(const char *hex);</span><br><span> void ms_sends_msg(const char *hex);</span><br><span> void ms_sends_security_mode_complete();</span><br><span> void gsup_rx(const char *rx_hex, const char *expect_tx_hex);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/10987">change 10987</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/10987"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-msc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I73c7cb6a86624695bd9c0f59abb72e2fdc655131 </div>
<div style="display:none"> Gerrit-Change-Number: 10987 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>
<div style="display:none"> Gerrit-CC: Vadim Yanitskiy <axilirator@gmail.com> </div>