diff options
-rw-r--r-- | openbsc/include/openbsc/gb_proxy.h | 4 | ||||
-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 | 12 | ||||
-rw-r--r-- | openbsc/tests/gbproxy/gbproxy_test.c | 12 |
5 files changed, 16 insertions, 16 deletions
diff --git a/openbsc/include/openbsc/gb_proxy.h b/openbsc/include/openbsc/gb_proxy.h index d818114ba..21a4f0542 100644 --- a/openbsc/include/openbsc/gb_proxy.h +++ b/openbsc/include/openbsc/gb_proxy.h @@ -152,7 +152,7 @@ struct gbproxy_tlli_info { int is_deregistered; - int enable_patching; + int imsi_matches; }; @@ -178,7 +178,7 @@ void gbprox_reset(struct gbproxy_config *cfg); /* TLLI state handling */ void gbproxy_delete_tllis(struct gbproxy_peer *peer); -int gbproxy_check_tlli( +int gbproxy_imsi_matches( struct gbproxy_peer *peer, struct gbproxy_tlli_info *tlli_info); struct gbproxy_tlli_info *gbprox_find_tlli_by_ptmsi( diff --git a/openbsc/src/gprs/gb_proxy.c b/openbsc/src/gprs/gb_proxy.c index 8b5a67269..886d3c342 100644 --- a/openbsc/src/gprs/gb_proxy.c +++ b/openbsc/src/gprs/gb_proxy.c @@ -574,7 +574,7 @@ static int gbprox_process_bssgp_ul(struct gbproxy_config *cfg, if (tlli_info && cfg->route_to_sgsn2) { if (cfg->acquire_imsi && tlli_info->imsi_len == 0) sgsn_nsei = 0xffff; - else if (gbproxy_check_tlli(peer, tlli_info)) + else if (gbproxy_imsi_matches(peer, tlli_info)) sgsn_nsei = cfg->nsip_sgsn2_nsei; } diff --git a/openbsc/src/gprs/gb_proxy_patch.c b/openbsc/src/gprs/gb_proxy_patch.c index bf0f22e08..93b85880c 100644 --- a/openbsc/src/gprs/gb_proxy_patch.c +++ b/openbsc/src/gprs/gb_proxy_patch.c @@ -245,7 +245,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, tlli_info) && peer->cfg->core_apn) { + gbproxy_imsi_matches(peer, tlli_info) && peer->cfg->core_apn) { 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 8aadd2f44..969bee76c 100644 --- a/openbsc/src/gprs/gb_proxy_tlli.c +++ b/openbsc/src/gprs/gb_proxy_tlli.c @@ -357,20 +357,20 @@ static void gbproxy_unregister_tlli(struct gbproxy_peer *peer, return; } -int gbproxy_check_tlli(struct gbproxy_peer *peer, +int gbproxy_imsi_matches(struct gbproxy_peer *peer, struct gbproxy_tlli_info *tlli_info) { if (!peer->cfg->check_imsi) return 1; - return tlli_info != NULL && tlli_info->enable_patching; + return tlli_info != NULL && tlli_info->imsi_matches; } void gbproxy_assign_imsi(struct gbproxy_peer *peer, struct gbproxy_tlli_info *tlli_info, struct gprs_gb_parse_context *parse_ctx) { - int enable_patching; + int imsi_matches; struct gbproxy_tlli_info *other_tlli_info; /* Make sure that there is a second entry with the same IMSI */ @@ -393,10 +393,10 @@ void gbproxy_assign_imsi(struct gbproxy_peer *peer, parse_ctx->imsi, parse_ctx->imsi_len); /* Check, whether the IMSI matches */ - enable_patching = gbproxy_check_imsi(peer, parse_ctx->imsi, + imsi_matches = gbproxy_check_imsi(peer, parse_ctx->imsi, parse_ctx->imsi_len); - if (enable_patching >= 0) - tlli_info->enable_patching = enable_patching; + if (imsi_matches >= 0) + tlli_info->imsi_matches = imsi_matches; } static int gbproxy_tlli_match(const struct gbproxy_tlli_state *a, diff --git a/openbsc/tests/gbproxy/gbproxy_test.c b/openbsc/tests/gbproxy/gbproxy_test.c index 80bf905e6..b0a39c062 100644 --- a/openbsc/tests/gbproxy/gbproxy_test.c +++ b/openbsc/tests/gbproxy/gbproxy_test.c @@ -151,7 +151,7 @@ static int dump_peers(FILE *stream, int indent, time_t now, if (stored_msgs) fprintf(stream, ", STORED %d", stored_msgs); - if (cfg->check_imsi && tlli_info->enable_patching) + if (cfg->check_imsi && tlli_info->imsi_matches) fprintf(stream, ", IMSI matches"); if (tlli_info->imsi_acq_pending) @@ -3612,13 +3612,13 @@ struct gbproxy_tlli_info *register_tlli( const uint8_t *imsi, size_t imsi_len, time_t now) { struct gbproxy_tlli_info *tlli_info; - int enable_patching = -1; + int imsi_matches = -1; int tlli_already_known = 0; /* Check, whether the IMSI matches */ if (gprs_is_mi_imsi(imsi, imsi_len)) { - enable_patching = gbproxy_check_imsi(peer, imsi, imsi_len); - if (enable_patching < 0) + imsi_matches = gbproxy_check_imsi(peer, imsi, imsi_len); + if (imsi_matches < 0) return NULL; } @@ -3652,8 +3652,8 @@ struct gbproxy_tlli_info *register_tlli( gbproxy_attach_tlli_info(peer, now, tlli_info); gbproxy_update_tlli_info(tlli_info, imsi, imsi_len); - if (enable_patching >= 0) - tlli_info->enable_patching = enable_patching; + if (imsi_matches >= 0) + tlli_info->imsi_matches = imsi_matches; return tlli_info; } |