diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2014-08-13 14:17:23 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-08-24 16:16:39 +0200 |
commit | 3c5b40fb759e07bba63b06b80560f1c59125c8e0 (patch) | |
tree | 9a64107cc4597912e8c2052bf50567575ba46aba /openbsc/src/gprs | |
parent | 3e23ddf88b38f9316b61daff6f8f41e57e883a14 (diff) |
gbproxy: Update enable_patching flag on existing tlli_info
Currently the enable_patching field in tlli_info is not updated,
when an IMSI is assigned to a TLLI that is already known.
This patch fixes this in gbprox_update_state() after the call to
gbprox_update_tlli_info().
The number of APN increases and the test output file is updated
accordingly.
Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/src/gprs')
-rw-r--r-- | openbsc/src/gprs/gb_proxy.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/openbsc/src/gprs/gb_proxy.c b/openbsc/src/gprs/gb_proxy.c index dd7dead2b..5e19247a2 100644 --- a/openbsc/src/gprs/gb_proxy.c +++ b/openbsc/src/gprs/gb_proxy.c @@ -1437,10 +1437,18 @@ static struct gbproxy_tlli_info *gbprox_update_state( gbprox_touch_tlli(peer, tlli_info, now); } - if (parse_ctx->imsi && tlli_info && tlli_info->mi_data_len == 0) + if (parse_ctx->imsi && tlli_info && tlli_info->mi_data_len == 0) { + int enable_patching; gbprox_update_tlli_info(tlli_info, parse_ctx->imsi, parse_ctx->imsi_len); + /* Check, whether the IMSI matches */ + enable_patching = gbprox_check_imsi(peer, parse_ctx->imsi, + parse_ctx->imsi_len); + if (enable_patching >= 0) + tlli_info->enable_patching = enable_patching; + } + return tlli_info; } |