aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2023-07-31 16:11:57 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2023-07-31 16:12:58 +0200
commit58342fdbe280b140907b10fe95396a8ef3e3db41 (patch)
tree00349546dbd0ae67386c734cc3016e85b6912f18
parent0f51adb03efc5fb7f96c3eb6f7f3acf5e2d59a9f (diff)
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
-rw-r--r--include/osmocom/gprs/rlcmac/gre.h1
-rw-r--r--src/rlcmac/gre.c1
-rw-r--r--src/rlcmac/rlcmac.c2
-rw-r--r--src/rlcmac/rlcmac_prim.c4
4 files changed, 7 insertions, 1 deletions
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_tbf;
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 @@ struct gprs_rlcmac_entity *gprs_rlcmac_entity_alloc(uint32_t tlli)
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 *gprs_rlcmac_find_entity_by_tlli(uint32_t tlli)
{
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 @@ static int rlcmac_prim_handle_gmmrr_assign_req(struct osmo_gprs_rlcmac_prim *rlc
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 @@ static int rlcmac_prim_handle_gmmrr_assign_req(struct osmo_gprs_rlcmac_prim *rlc
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