pespin has submitted this change. (
https://gerrit.osmocom.org/c/libosmo-gprs/+/32998 )
Change subject: gmm: Stop READY timer upon receiving force_stdby IE
......................................................................
gmm: Stop READY timer upon receiving force_stdby IE
Change-Id: I44d0f69571f6425fef74a10602001aca4ecb5716
---
M src/gmm/gmm.c
M tests/gmm/gmm_prim_test.err
2 files changed, 28 insertions(+), 4 deletions(-)
Approvals:
laforge: Looks good to me, but someone else must approve
Jenkins Builder: Verified
pespin: Looks good to me, approved
diff --git a/src/gmm/gmm.c b/src/gmm/gmm.c
index 1944b86..ade4059 100644
--- a/src/gmm/gmm.c
+++ b/src/gmm/gmm.c
@@ -779,6 +779,8 @@
gmme->t3312_assigned_sec = periodic_rau_sec >= 0 ? periodic_rau_sec : 0;
if (gmme->t3312_assigned_sec == 0)
gprs_gmm_gmme_t3312_stop(gmme);
+ if (aa->force_stby)
+ gprs_gmm_gmme_ready_timer_stop(gmme);
gsm48_parse_ra(&gmme->ra, (const uint8_t *)&aa->ra_id);
if (len > sizeof(*gh) + sizeof(*aa)) {
@@ -906,6 +908,9 @@
LOGGMME(gmme, LOGL_INFO, "Rx GMM DETACH ACCEPT (MO)
force_standby_indicated=%s\n",
force_standby_indicated ? "true" : "false");
+ if (force_standby_indicated)
+ gprs_gmm_gmme_ready_timer_stop(gmme);
+
/* TODO: submit GMMSM-RELEASE-IND */
/* Submit LLGMM-ASSIGN-REQ as per TS 24.007 Annex C.3 */
@@ -949,6 +954,8 @@
gmme->t3312_assigned_sec = periodic_rau_sec >= 0 ? periodic_rau_sec : 0;
if (gmme->t3312_assigned_sec == 0)
gprs_gmm_gmme_t3312_stop(gmme);
+ if (raack->force_stby)
+ gprs_gmm_gmme_ready_timer_stop(gmme);
gsm48_parse_ra(&gmme->ra, (const uint8_t *)&raack->ra_id);
if (len > sizeof(*gh) + sizeof(*raack)) {
@@ -1053,6 +1060,7 @@
* The IDENTITY RESPONSE message shall contain the identification parameters as
requested by the network"
*/
uint8_t id_type;
+ bool force_standby_indicated;
if (len < sizeof(struct gsm48_hdr) + 1) {
LOGGMME(gmme, LOGL_ERROR, "Rx GMM IDENTITY REQUEST with wrong size %u\n",
len);
@@ -1060,8 +1068,12 @@
}
id_type = gh->data[0] & 0xf;
- LOGGMME(gmme, LOGL_INFO, "Rx GMM IDENTITY REQUEST mi_type=%s\n",
- gsm48_mi_type_name(id_type));
+ force_standby_indicated = (gh->data[0] >> 4) == 0x01;
+ LOGGMME(gmme, LOGL_INFO, "Rx GMM IDENTITY REQUEST mi_type=%s
force_stdby=%u\n",
+ gsm48_mi_type_name(id_type), force_standby_indicated);
+
+ if (force_standby_indicated)
+ gprs_gmm_gmme_ready_timer_stop(gmme);
return gprs_gmm_tx_id_resp(gmme, id_type);
}
@@ -1173,6 +1185,9 @@
/* TODO: 9.4.9.7 Replayed MS Radio Access Capability */
}
+ if (acreq->force_stby)
+ gprs_gmm_gmme_ready_timer_stop(gmme);
+
gmme->auth_ciph.gea = acreq->ciph_alg;
gmme->auth_ciph.req.ac_ref_nr = acreq->ac_ref_nr;
gmme->auth_ciph.req.imeisv_requested = acreq->imeisv_req;
diff --git a/tests/gmm/gmm_prim_test.err b/tests/gmm/gmm_prim_test.err
index dea0ca7..64af93b 100644
--- a/tests/gmm/gmm_prim_test.err
+++ b/tests/gmm/gmm_prim_test.err
@@ -7,7 +7,7 @@
DLGLOBAL INFO Rx from lower layers: GMRR-LLC_TRANSMITTED.indication
DLGLOBAL INFO GMM_MS{Deregistered}: state_chg to RegisteredInitiated
DLGLOBAL INFO Rx from lower layers: LL-UNITDATA.indication
-DLGLOBAL INFO GMME(IMSI-1234567890:PTMSI-00001234:TLLI-80001234) Rx GMM IDENTITY REQUEST
mi_type=IMEI
+DLGLOBAL INFO GMME(IMSI-1234567890:PTMSI-00001234:TLLI-80001234) Rx GMM IDENTITY REQUEST
mi_type=IMEI force_stdby=0
DLGLOBAL INFO GMME(IMSI-1234567890:PTMSI-00001234:TLLI-80001234) Tx GMM IDENTITY
RESPONSE
DLGLOBAL INFO Rx from lower layers: GMRR-LLC_TRANSMITTED.indication
DLGLOBAL INFO Rx from lower layers: LL-UNITDATA.indication
@@ -60,7 +60,7 @@
DLGLOBAL INFO Rx from lower layers: GMRR-LLC_TRANSMITTED.indication
DLGLOBAL INFO GMM_MS{Deregistered}: state_chg to RegisteredInitiated
DLGLOBAL INFO Rx from lower layers: LL-UNITDATA.indication
-DLGLOBAL INFO GMME(IMSI-1234567890:PTMSI-00001234:TLLI-80001234) Rx GMM IDENTITY REQUEST
mi_type=IMEI
+DLGLOBAL INFO GMME(IMSI-1234567890:PTMSI-00001234:TLLI-80001234) Rx GMM IDENTITY REQUEST
mi_type=IMEI force_stdby=0
DLGLOBAL INFO GMME(IMSI-1234567890:PTMSI-00001234:TLLI-80001234) Tx GMM IDENTITY
RESPONSE
DLGLOBAL INFO Rx from lower layers: GMRR-LLC_TRANSMITTED.indication
DLGLOBAL INFO Rx from lower layers: LL-UNITDATA.indication
--
To view, visit
https://gerrit.osmocom.org/c/libosmo-gprs/+/32998
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: I44d0f69571f6425fef74a10602001aca4ecb5716
Gerrit-Change-Number: 32998
Gerrit-PatchSet: 4
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged