summaryrefslogtreecommitdiffstats
path: root/src/host/layer23/src/mobile
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2023-10-23 14:15:50 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2023-10-27 09:12:22 +0200
commitbfebc813842650e1d5191d561ef4a18b3c9b7eb6 (patch)
tree720869ae7d26f41a203ef086ee59bff841089b48 /src/host/layer23/src/mobile
parent8c190e6f927a34e5967fe0abd189604f6024f51b (diff)
ASCI: Use correct mobile identiy in TALKER INDICATION message
Use TMSI only if valid in the current location area. If the MS moves to a different location area and joins a group call before location update, TMSI is not valid. Then use IMSI instead. If no IMSI/TSMI is available, send mobile identity without IMSI/TMSI. Change-Id: I299604a0e12d91e9133b70757826ac9637da0e3e Related: OS#5364
Diffstat (limited to 'src/host/layer23/src/mobile')
-rw-r--r--src/host/layer23/src/mobile/gsm48_rr.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/host/layer23/src/mobile/gsm48_rr.c b/src/host/layer23/src/mobile/gsm48_rr.c
index 3200412f..b8980907 100644
--- a/src/host/layer23/src/mobile/gsm48_rr.c
+++ b/src/host/layer23/src/mobile/gsm48_rr.c
@@ -2085,6 +2085,8 @@ static int gsm48_rr_uplink_access_abort(struct osmocom_ms *ms, uint8_t cause)
static int gsm48_rr_tx_talker_indication(struct osmocom_ms *ms)
{
struct gsm48_rrlayer *rr = &ms->rrlayer;
+ struct gsm_subscriber *subscr = &ms->subscr;
+ struct gsm322_cellsel *cs = &ms->cellsel;
struct msgb *nmsg;
struct gsm48_hdr *gh;
struct gsm48_talker_indication *ti;
@@ -2103,8 +2105,18 @@ static int gsm48_rr_tx_talker_indication(struct osmocom_ms *ms)
/* classmark 2 */
ti->cm2_len = sizeof(ti->cm2);
gsm48_rr_enc_cm2(ms, &ti->cm2, rr->cd_now.arfcn);
- /* mobile identity (Use TMSI if available.) */
- gsm48_encode_mi_lv(ms, nmsg, GSM_MI_TYPE_TMSI, false);
+
+ /* mobile identity */
+ if (ms->subscr.tmsi != GSM_RESERVED_TMSI && (osmo_lai_cmp(&subscr->lai, &cs->sel_cgi.lai) == 0)) {
+ gsm48_encode_mi_lv(ms, nmsg, GSM_MI_TYPE_TMSI, false);
+ LOGP(DRR, LOGL_INFO, "Sending TALKER INDICATION with TMSI.\n");
+ } else if (subscr->imsi[0]) {
+ gsm48_encode_mi_lv(ms, nmsg, GSM_MI_TYPE_IMSI, false);
+ LOGP(DRR, LOGL_INFO, "Sending TALKER INDICATION with IMSI.\n");
+ } else {
+ gsm48_encode_mi_lv(ms, nmsg, GSM_MI_TYPE_NONE, false);
+ LOGP(DRR, LOGL_INFO, "Sending TALKER INDICATION without TMSI/IMSI.\n");
+ }
/* start establishmnet */
return gsm48_send_rsl(ms, RSL_MT_EST_REQ, nmsg, 0);