aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-12-27 17:19:19 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-12-27 17:22:32 +0100
commit2147bc4cc989928b6685669d49c79fe12f5ab913 (patch)
tree20eb9ea28fa89d84f3132a339a20ad9e5d01e34e
parentdefb10fa62f537cd6e623d3ab1ebd3ebfcf05e06 (diff)
periodic/lu: Attempt to implicitly attach a subscriber instead of rejecting
When modern Smartphones receive "Not in VLR". The baseband firmware apparently does not try to do an IMSI ATTACH but just remains un-happy and will not connect to the network anymore.
-rw-r--r--openbsc/src/libmsc/gsm_04_08.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c
index 63603934b..75e464d5f 100644
--- a/openbsc/src/libmsc/gsm_04_08.c
+++ b/openbsc/src/libmsc/gsm_04_08.c
@@ -804,6 +804,21 @@ int gsm48_tx_mm_auth_rej(struct gsm_subscriber_connection *conn)
return gsm48_tx_simple(conn, GSM48_PDISC_MM, GSM48_MT_MM_AUTH_REJ);
}
+/*
+ * At the 30C3 phones miss their periodic update
+ * interval a lot and then remain unreachable. In case
+ * we still know the TMSI we can just attach it again.
+ */
+static void implit_attach(struct gsm_subscriber_connection *conn)
+{
+ if (conn->subscr->lac != GSM_LAC_RESERVED_DETACHED)
+ return;
+
+ subscr_update(conn->subscr, conn->bts,
+ GSM_SUBSCRIBER_UPDATE_ATTACHED);
+}
+
+
static int _gsm48_rx_mm_serv_req_sec_cb(
unsigned int hooknum, unsigned int event,
struct msgb *msg, void *data, void *param)
@@ -822,11 +837,13 @@ static int _gsm48_rx_mm_serv_req_sec_cb(
case GSM_SECURITY_NOAVAIL:
case GSM_SECURITY_ALREADY:
rc = gsm48_tx_mm_serv_ack(conn);
+ implit_attach(conn);
break;
case GSM_SECURITY_SUCCEEDED:
/* nothing to do. CIPHER MODE COMMAND is
* implicit CM SERV ACK */
+ implit_attach(conn);
break;
default:
@@ -897,10 +914,6 @@ static int gsm48_rx_mm_serv_req(struct gsm_subscriber_connection *conn, struct m
if (!subscr)
return gsm48_tx_mm_serv_rej(conn,
GSM48_REJECT_IMSI_UNKNOWN_IN_HLR);
- if (subscr->lac == GSM_LAC_RESERVED_DETACHED)
- /* If the subscriber is not attached, reject service */
- return gsm48_tx_mm_serv_rej(conn,
- GSM48_REJECT_IMSI_UNKNOWN_IN_VLR);
if (!conn->subscr)
conn->subscr = subscr;