diff options
Diffstat (limited to 'openbsc/src/gprs')
-rw-r--r-- | openbsc/src/gprs/gb_proxy.c | 2 | ||||
-rw-r--r-- | openbsc/src/gprs/gb_proxy_patch.c | 2 | ||||
-rw-r--r-- | openbsc/src/gprs/gb_proxy_tlli.c | 10 |
3 files changed, 4 insertions, 10 deletions
diff --git a/openbsc/src/gprs/gb_proxy.c b/openbsc/src/gprs/gb_proxy.c index 2026d1a03..e77d52792 100644 --- a/openbsc/src/gprs/gb_proxy.c +++ b/openbsc/src/gprs/gb_proxy.c @@ -330,7 +330,7 @@ static int gbprox_process_bssgp_ul(struct gbproxy_config *cfg, tlli_info = gbproxy_update_tlli_state_ul(peer, now, &parse_ctx); - if (tlli_info && tlli_info->enable_patching && cfg->route_to_sgsn2) { + if (tlli_info && cfg->route_to_sgsn2 && gbproxy_check_tlli(peer, tlli_info)) { sgsn_nsei = cfg->nsip_sgsn2_nsei; send_msg_directly = 1; } diff --git a/openbsc/src/gprs/gb_proxy_patch.c b/openbsc/src/gprs/gb_proxy_patch.c index 32e844eca..c1b88d99e 100644 --- a/openbsc/src/gprs/gb_proxy_patch.c +++ b/openbsc/src/gprs/gb_proxy_patch.c @@ -278,7 +278,7 @@ int gbproxy_patch_llc(struct msgb *msg, uint8_t *llc, size_t llc_len, if (parse_ctx->apn_ie && peer->cfg->core_apn && !parse_ctx->to_bss && - gbproxy_check_tlli(peer, parse_ctx->tlli)) { + gbproxy_check_tlli(peer, tlli_info)) { size_t new_len; gbproxy_patch_apn_ie(msg, parse_ctx->apn_ie, parse_ctx->apn_ie_len, diff --git a/openbsc/src/gprs/gb_proxy_tlli.c b/openbsc/src/gprs/gb_proxy_tlli.c index 22585ab5e..2074308cf 100644 --- a/openbsc/src/gprs/gb_proxy_tlli.c +++ b/openbsc/src/gprs/gb_proxy_tlli.c @@ -369,18 +369,12 @@ static void gbproxy_unregister_tlli(struct gbproxy_peer *peer, uint32_t tlli) } } -int gbproxy_check_tlli(struct gbproxy_peer *peer, uint32_t tlli) +int gbproxy_check_tlli(struct gbproxy_peer *peer, + struct gbproxy_tlli_info *tlli_info) { - struct gbproxy_tlli_info *tlli_info; - - LOGP(DGPRS, LOGL_INFO, "Checking TLLI %08x, class: %d\n", - tlli, gprs_tlli_type(tlli)); - if (!peer->cfg->check_imsi) return 1; - tlli_info = gbproxy_find_tlli(peer, tlli); - return tlli_info != NULL && tlli_info->enable_patching; } |