aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Santos <jrsantos@jonathanrsantos.com>2011-07-31 10:27:31 -0400
committerJonathan Santos <jrsantos@jonathanrsantos.com>2011-07-31 10:27:31 -0400
commit7cfdff76caa08dab758c3a19d7945439b5d01a19 (patch)
tree0452ffba43ccca487d4ccd807c8ad68c4e72be91
parenta5fee1cb8d317ec837670075243a56fe14fa33c5 (diff)
Revert "gprs: Fix bug that caused TLLI to change prematurely"
This reverts commit bd92172bf42c1589ded17d976dd0af3b90adc871.
-rw-r--r--src/gprs/gprs_gmm.c17
-rw-r--r--src/gprs/gprs_sgsn.c1
2 files changed, 9 insertions, 9 deletions
diff --git a/src/gprs/gprs_gmm.c b/src/gprs/gprs_gmm.c
index f98dcf0d..0db51254 100644
--- a/src/gprs/gprs_gmm.c
+++ b/src/gprs/gprs_gmm.c
@@ -754,6 +754,10 @@ static int gsm48_rx_gmm_att_req(struct sgsn_mm_ctx *ctx, struct msgb *msg,
* foreign TLLI to local TLLI */
ctx->tlli_new = gprs_tmsi2tlli(ctx->p_tmsi, TLLI_LOCAL);
+ /* Inform LLC layer about new TLLI but keep old active */
+ gprs_llgmm_assign(ctx->llme, ctx->tlli, ctx->tlli_new,
+ GPRS_ALGO_GEA0, NULL);
+
DEBUGPC(DMM, "\n");
return ctx ? gsm48_gmm_authorize(ctx, GMM_T3350_MODE_ATT) : 0;
@@ -965,6 +969,10 @@ static int gsm48_rx_gmm_ra_upd_req(struct sgsn_mm_ctx *mmctx, struct msgb *msg,
* foreign TLLI to local TLLI */
mmctx->tlli_new = gprs_tmsi2tlli(mmctx->p_tmsi, TLLI_LOCAL);
+ /* Inform LLC layer about new TLLI but keep old active */
+ gprs_llgmm_assign(mmctx->llme, mmctx->tlli, mmctx->tlli_new,
+ GPRS_ALGO_GEA0, NULL);
+
/* Look at PDP Context Status IE and see if MS's view of
* activated/deactivated NSAPIs agrees with our view */
if (TLVP_PRESENT(&tp, GSM48_IE_GMM_PDP_CTX_STATUS)) {
@@ -1025,9 +1033,6 @@ static int gsm0408_rcv_gmm(struct sgsn_mm_ctx *mmctx, struct msgb *msg,
mmctx->mm_state = GMM_REGISTERED_NORMAL;
mmctx_timer_stop(mmctx, 3350);
mmctx->p_tmsi_old = 0;
- /* Inform LLC layer about new TLLI but keep old active */
- gprs_llgmm_assign(mmctx->llme, mmctx->tlli, mmctx->tlli_new,
- GPRS_ALGO_GEA0, NULL);
mmctx->tlli = mmctx->tlli_new;
gprs_llgmm_resume(mmctx->llme);
break;
@@ -1036,9 +1041,6 @@ static int gsm0408_rcv_gmm(struct sgsn_mm_ctx *mmctx, struct msgb *msg,
DEBUGP(DMM, "-> ROUTEING AREA UPDATE COMPLETE\n");
mmctx_timer_stop(mmctx, 3350);
mmctx->p_tmsi_old = 0;
- /* Inform LLC layer about new TLLI but keep old active */
- gprs_llgmm_assign(mmctx->llme, mmctx->tlli, mmctx->tlli_new,
- GPRS_ALGO_GEA0, NULL);
mmctx->tlli = mmctx->tlli_new;
gprs_llgmm_resume(mmctx->llme);
break;
@@ -1046,9 +1048,6 @@ static int gsm0408_rcv_gmm(struct sgsn_mm_ctx *mmctx, struct msgb *msg,
DEBUGP(DMM, "-> PTMSI REALLLICATION COMPLETE\n");
mmctx_timer_stop(mmctx, 3350);
mmctx->p_tmsi_old = 0;
- /* Inform LLC layer about new TLLI but keep old active */
- gprs_llgmm_assign(mmctx->llme, mmctx->tlli, mmctx->tlli_new,
- GPRS_ALGO_GEA0, NULL);
mmctx->tlli = mmctx->tlli_new;
break;
case GSM48_MT_GMM_AUTH_CIPH_RESP:
diff --git a/src/gprs/gprs_sgsn.c b/src/gprs/gprs_sgsn.c
index a46711b4..44365541 100644
--- a/src/gprs/gprs_sgsn.c
+++ b/src/gprs/gprs_sgsn.c
@@ -108,6 +108,7 @@ struct sgsn_mm_ctx *sgsn_mm_ctx_by_tlli(uint32_t tlli,
llist_for_each_entry(ctx, &sgsn_mm_ctxts, list) {
if ((ctx->p_tmsi | 0xC0000000) == tlli ||
(ctx->p_tmsi_old && (ctx->p_tmsi_old | 0xC0000000) == tlli)) {
+ ctx->tlli = tlli;
return ctx;
}
}