aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs_ms_storage.cpp
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-05-15 15:50:43 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-05-21 17:10:42 +0200
commit939904672961fa7e28397e27f942a7d1fff4bbdf (patch)
treef17d491b73f8c54982da96a2431b45e8d98f6000 /src/gprs_ms_storage.cpp
parente43460b50fc152026ab96b5095b94fbac6939ab2 (diff)
ms: Support new and old TLLIs
According to the specification (GSM 04.08/24.008, 4.7.1.5) after a new P-TMSI has been assigned, the old P-TMSI must be kept basically until it has been used by both sides. Since the TLLI will be derived from the P-TMSI, the old TLLI must also be kept until the new TLLI has been used by both MS and SGSN. This commit modifies the TLLI handling of GprsMs accordingly. set_tlli() is only used with TLLIs derived from MS messages, confirm_tlli() is used with TLLIs derived from messages received from the SGSN. tlli() returns the value set by the MS. check_tlli() matches each of the TLLI used by either MS or SGSN as well as the old TLLI until it has been confirmed. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/gprs_ms_storage.cpp')
-rw-r--r--src/gprs_ms_storage.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gprs_ms_storage.cpp b/src/gprs_ms_storage.cpp
index 7260f1bb..4f72c86f 100644
--- a/src/gprs_ms_storage.cpp
+++ b/src/gprs_ms_storage.cpp
@@ -58,9 +58,9 @@ GprsMs *GprsMsStorage::get_ms(uint32_t tlli, uint32_t old_tlli, const char *imsi
llist_for_each(pos, &m_list) {
ms = pos->entry();
- if (tlli && ms->tlli() == tlli)
+ if (ms->check_tlli(tlli))
break;
- if (old_tlli && ms->tlli() == old_tlli)
+ if (ms->check_tlli(old_tlli))
break;
/* TODO: Check for IMSI */