diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2014-08-06 18:50:05 +0200 |
---|---|---|
committer | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2014-08-13 09:57:25 +0200 |
commit | fb22ac52b0086652fd39f26d1251a7b8a2bfcba9 (patch) | |
tree | 2026c9ddbafde98a95685b16a76baa854a9e36aa /openbsc/src/gprs/gb_proxy.c | |
parent | 690768a1717cda1fbc027ed75c818e886da50f7c (diff) |
gbproxy: Explicitly convert PTMSI to TLLI
This patch modifies the new_ptmsi handling by setting its two most
significant bits before using it as TLLI.
Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/src/gprs/gb_proxy.c')
-rw-r--r-- | openbsc/src/gprs/gb_proxy.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/openbsc/src/gprs/gb_proxy.c b/openbsc/src/gprs/gb_proxy.c index 7945c42df..30e4c6b2f 100644 --- a/openbsc/src/gprs/gb_proxy.c +++ b/openbsc/src/gprs/gb_proxy.c @@ -1289,8 +1289,10 @@ static void gbprox_update_state(struct gbproxy_peer *peer, } if (parse_ctx->new_ptmsi_enc && parse_ctx->to_bss && parse_ctx->imsi) { - /* A new TLLI (PTMSI) has been signaled in the message */ + /* A new PTMSI has been signaled in the message, + * register new TLLI */ uint32_t new_ptmsi; + uint32_t new_tlli; if (!parse_mi_tmsi(parse_ctx->new_ptmsi_enc, GSM48_TMSI_LEN, &new_ptmsi)) { LOGP(DGPRS, LOGL_ERROR, @@ -1298,9 +1300,10 @@ static void gbprox_update_state(struct gbproxy_peer *peer, parse_ctx->tlli); return; } + new_tlli = gprs_tmsi2tlli(new_ptmsi, TLLI_LOCAL); LOGP(DGPRS, LOGL_INFO, - "Got new TLLI/PTMSI %08x (current is %08x)\n", - new_ptmsi, parse_ctx->tlli); + "Got new TLLI/PTMSI %08x/%08x (current is %08x)\n", + new_tlli, new_ptmsi, parse_ctx->tlli); gbprox_register_tlli(peer, new_ptmsi, parse_ctx->imsi, parse_ctx->imsi_len); } else if (parse_ctx->tlli && parse_ctx->imsi) { |