aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs/gprs_gmm.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-12-23 23:34:43 +0100
committerHarald Welte <laforge@gnumonks.org>2010-12-23 23:38:02 +0100
commitf6bd340df6bcac716da78da8e35f379a7b853027 (patch)
tree13818dba492f0d54c6b217f498348d250f48cf0d /openbsc/src/gprs/gprs_gmm.c
parent985263e55f3b78cf3c67b2dc39edab4c6bf62ad4 (diff)
GPRS/GMM: Correctly look up MM Context in RA Update
If a MS changes RA, the RA will arrive in the new cell using the old TLLI (masked as foreign TLLI). So we need to look-up the TLLI in a special way, using the old RA as indicated in the 04.08 GMM message. There is still another bug remaining: As we somehow create a new LLC, the sequence numbers of our responses start from 0 again, which is not what the MS expects. This needs to be fixed in a follow-up patch.
Diffstat (limited to 'openbsc/src/gprs/gprs_gmm.c')
-rw-r--r--openbsc/src/gprs/gprs_gmm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c
index 817092e31..82a4ca85b 100644
--- a/openbsc/src/gprs/gprs_gmm.c
+++ b/openbsc/src/gprs/gprs_gmm.c
@@ -899,6 +899,7 @@ static int gsm48_rx_gmm_ra_upd_req(struct sgsn_mm_ctx *mmctx, struct msgb *msg,
}
/* Look-up the MM context based on old RA-ID and TLLI */
+ mmctx = sgsn_mm_ctx_by_tlli(msgb_tlli(msg), &old_ra_id);
if (!mmctx || mmctx->mm_state == GMM_DEREGISTERED) {
/* The MS has to perform GPRS attach */
DEBUGPC(DMM, " REJECT\n");