aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2019-08-24 16:04:38 +0200
committerAlexander Couzens <lynxis@fe80.eu>2019-08-24 16:10:34 +0200
commit7091bbde2281917bc60bfe55818a71539d83761c (patch)
treeb6ae6bea9261bef461632e11fa080e6a195500ff
parentd4c289652e66b25f5e2b3becd16b60e5ac67e57d (diff)
gsm48_rx_gmm_att_req(): cleanup old statecccamp2019
-rw-r--r--src/gprs/gprs_gmm.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gprs/gprs_gmm.c b/src/gprs/gprs_gmm.c
index d93d307b2..06b992141 100644
--- a/src/gprs/gprs_gmm.c
+++ b/src/gprs/gprs_gmm.c
@@ -1561,6 +1561,21 @@ static int gsm48_rx_gmm_att_req(struct sgsn_mm_ctx *ctx, struct msgb *msg,
goto rejected;
}
+ /* Iu -> GERAN transition */
+ if (ctx->ran_type == MM_CTX_T_UTRAN_Iu &&
+ !MSG_IU_UE_CTX(msg)) {
+ mmctx_cleanup_utran(ctx);
+ ctx->ran_type = MM_CTX_T_GERAN_Gb;
+ if (!ctx->gb.llme)
+ ctx->gb.llme = llme;
+ } else if (ctx->ran_type == MM_CTX_T_GERAN_Gb &&
+ MSG_IU_UE_CTX(msg)) {
+ /* 2G -> 3G transition */
+ mmctx_cleanup_geran(ctx);
+ ctx->iu.ue_ctx = MSG_IU_UE_CTX(msg);
+ ctx->ran_type = MM_CTX_T_UTRAN_Iu;
+ }
+
msgid2mmctx(ctx, msg);
/* Update MM Context with currient RA and Cell ID */
ctx->ra = ra_id;