path: root/openbsc/src/gprs/gb_proxy_patch.c
diff options
authorJacob Erlbeck <>2014-09-08 09:59:16 +0200
committerJacob Erlbeck <>2014-09-08 10:20:16 +0200
commit18a3787296b80396ee068ee7ca5a0803c86adcdd (patch)
tree40b2a4c9930e5f1acf0d28958c5ad03211a0c666 /openbsc/src/gprs/gb_proxy_patch.c
parent82add78f89fd8d21c647de5675e8e6304c8b8a4a (diff)
gbproxy: Check tlli_info when patching, fix APN patching
Currently the numeric TLLI or tlli_info's enable_patching flag is used to decide, whether a APN shall be patched or the secondary SGSN shall be used. Using the numeric TLLI imposes a problem, when TLLI/P-TMSI patching is used, since gbproxy_check_tlli uses the BSS side TLLI namespace when trying to get the tlli_info. This patch modifies the gbproxy_check_tlli() function to accept a tlli_info pointer instead of a numeric TLLI. The tlli_info is already available when the function is called. Since this a similar approach has been used by accessing the enable_patching flag directly, this commit unifies checking by always using this function instead of the flag outside of gb_proxy_tlli.c. This fixes the APN patching that doesn't work currently when P-TMSI patching is enabled. Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/src/gprs/gb_proxy_patch.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsc/src/gprs/gb_proxy_patch.c b/openbsc/src/gprs/gb_proxy_patch.c
index 32e844e..c1b88d9 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;
parse_ctx->apn_ie, parse_ctx->apn_ie_len,