aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2020-06-24 14:22:52 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2020-06-24 14:22:52 +0200
commit68f50dad76818e4173cdb5f1474cd9286e00f495 (patch)
treef564566b83874ea64f172adc1b0a4a75edcc1508
parenta4a45252df0aab3795bf104fa423b2c46d001336 (diff)
add comments to clarify some complete l3 details
-rw-r--r--src/libmsc/gsm_04_08.c8
-rw-r--r--src/libmsc/msc_a.c2
2 files changed, 9 insertions, 1 deletions
diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c
index a70c4b918..15303b599 100644
--- a/src/libmsc/gsm_04_08.c
+++ b/src/libmsc/gsm_04_08.c
@@ -1396,7 +1396,9 @@ static void msc_vlr_subscr_update(struct vlr_subscr *subscr)
msub_update_id(msub);
}
-/* VLR informs us that the subscriber has been associated with a conn */
+/* VLR informs us that the subscriber has been associated with a conn.
+ * The subscriber has *not* been authenticated yet, so the vsub should be protected from potentially invalid information
+ * from the msc_a. */
static int msc_vlr_subscr_assoc(void *msc_conn_ref,
struct vlr_subscr *vsub)
{
@@ -1406,6 +1408,10 @@ static int msc_vlr_subscr_assoc(void *msc_conn_ref,
if (msub_set_vsub(msub, vsub))
return -EINVAL;
+
+ /* FIXME: would be better to modify vsub->* only after the subscriber is authenticated, in
+ * evaluate_acceptance_outcome(conn_accepted == true). */
+
vsub->cs.attached_via_ran = msc_a->c.ran->type;
/* In case we have already received Classmark Information before the VLR Subscriber was
diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c
index 3bfc0f839..fd66ad3fd 100644
--- a/src/libmsc/msc_a.c
+++ b/src/libmsc/msc_a.c
@@ -1375,6 +1375,8 @@ int msc_a_ran_dec_from_msc_i(struct msc_a *msc_a, struct msc_a_ran_dec_data *d)
switch (msg->msg_type) {
case RAN_MSG_COMPL_L3:
+ /* In case the cell_id from Complete Layer 3 Information lacks a PLMN, write the configured PLMN code
+ * into msc_a->via_cell. Then overwrite with those bits obtained from Complete Layer 3 Information. */
msc_a->via_cell = (struct osmo_cell_global_id){
.lai.plmn = msc_a_net(msc_a)->plmn,
};