pespin has uploaded this change for review. ( 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, 23 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/98/32998/1
diff --git a/src/gmm/gmm.c b/src/gmm/gmm.c index ad16ac6..2511c96 100644 --- a/src/gmm/gmm.c +++ b/src/gmm/gmm.c @@ -777,7 +777,7 @@ periodic_rau_sec = gprs_gmm_gprs_tmr_to_secs(aa->ra_upd_timer); gmme->radio_prio = aa->radio_prio; gmme->t3312_assigned_sec = periodic_rau_sec >= 0 ? periodic_rau_sec : 0; - if (gmme->t3312_assigned_sec == 0) + if (gmme->t3312_assigned_sec == 0 || aa->force_stby) gprs_gmm_gmme_t3312_stop(gmme); gsm48_parse_ra(&gmme->ra, (const uint8_t *)&aa->ra_id);
@@ -947,7 +947,7 @@
periodic_rau_sec = gprs_gmm_gprs_tmr_to_secs(raack->ra_upd_timer); gmme->t3312_assigned_sec = periodic_rau_sec >= 0 ? periodic_rau_sec : 0; - if (gmme->t3312_assigned_sec == 0) + if (gmme->t3312_assigned_sec == 0 || raack->force_stby) gprs_gmm_gmme_t3312_stop(gmme); gsm48_parse_ra(&gmme->ra, (const uint8_t *)&raack->ra_id);
@@ -1053,6 +1053,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 +1061,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_t3312_stop(gmme);
return gprs_gmm_tx_id_resp(gmme, id_type); } @@ -1177,6 +1182,9 @@ /* TODO: 9.4.9.7 Replayed MS Radio Access Capability */ }
+ if (acreq->force_stby) + gprs_gmm_gmme_t3312_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