From 3c5b40fb759e07bba63b06b80560f1c59125c8e0 Mon Sep 17 00:00:00 2001 From: Jacob Erlbeck Date: Wed, 13 Aug 2014 14:17:23 +0200 Subject: 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 --- openbsc/src/gprs/gb_proxy.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'openbsc/src/gprs/gb_proxy.c') 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; } -- cgit v1.2.3