pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/34023 )
Change subject: rlcmac: keep looking up GRE based on old TLLI ......................................................................
rlcmac: keep looking up GRE based on old TLLI
This is needed after RAU Update since the PCU may still be using the old TLLI to reference the MS for a while until it finds out about the TLLI update.
Change-Id: I2653db3dac58342df02a1b4d0c76e69e0e8d583f --- M include/osmocom/gprs/rlcmac/gre.h M src/rlcmac/gre.c M src/rlcmac/rlcmac.c M src/rlcmac/rlcmac_prim.c 4 files changed, 19 insertions(+), 1 deletion(-)
Approvals: Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve fixeria: Looks good to me, approved
diff --git a/include/osmocom/gprs/rlcmac/gre.h b/include/osmocom/gprs/rlcmac/gre.h index a7317cd..be36e23 100644 --- a/include/osmocom/gprs/rlcmac/gre.h +++ b/include/osmocom/gprs/rlcmac/gre.h @@ -21,6 +21,7 @@ struct gprs_rlcmac_entity { struct llist_head entry; /* item in (struct gprs_rlcmac_ctx)->gre_list */ uint32_t tlli; + uint32_t old_tlli;
/* Used to match paging requests coming from CS domain: */ uint32_t ptmsi; diff --git a/src/rlcmac/gre.c b/src/rlcmac/gre.c index 0eb6a8c..9102124 100644 --- a/src/rlcmac/gre.c +++ b/src/rlcmac/gre.c @@ -66,6 +66,7 @@ goto err_free_gre;
gre->tlli = tlli; + gre->old_tlli = GPRS_RLCMAC_TLLI_UNASSIGNED; gre->ptmsi = GSM_RESERVED_TMSI; llist_add_tail(&gre->entry, &g_rlcmac_ctx->gre_list);
diff --git a/src/rlcmac/rlcmac.c b/src/rlcmac/rlcmac.c index f35c04d..a6d0e71 100644 --- a/src/rlcmac/rlcmac.c +++ b/src/rlcmac/rlcmac.c @@ -137,7 +137,7 @@ { struct gprs_rlcmac_entity *gre; llist_for_each_entry(gre, &g_rlcmac_ctx->gre_list, entry) { - if (gre->tlli == tlli) + if (gre->tlli == tlli || gre->old_tlli == tlli) return gre; } return NULL; diff --git a/src/rlcmac/rlcmac_prim.c b/src/rlcmac/rlcmac_prim.c index f13ac3d..1ce7c9e 100644 --- a/src/rlcmac/rlcmac_prim.c +++ b/src/rlcmac/rlcmac_prim.c @@ -469,6 +469,8 @@ rc = -ENOENT; goto free_ret; } + gre->old_tlli = old_tlli; + gre->tlli = GPRS_RLCMAC_TLLI_UNASSIGNED; gprs_rlcmac_entity_free(gre); gre = NULL; goto free_ret; @@ -481,7 +483,9 @@ goto free_ret; } LOGGRE(gre, LOGL_INFO, "Update TLLI 0x%08x -> 0x%08x\n", old_tlli, new_tlli); + gre->old_tlli = old_tlli; gre->tlli = new_tlli; + }
/* cache/update knowledge about this GMME's PTMSI and IMSI. It will be