diff options
Diffstat (limited to 'openbsc/src')
-rw-r--r-- | openbsc/src/gprs/gb_proxy.c | 4 | ||||
-rw-r--r-- | openbsc/src/gprs/gb_proxy_patch.c | 5 | ||||
-rw-r--r-- | openbsc/src/gprs/gprs_gb_parse.c | 4 |
3 files changed, 7 insertions, 6 deletions
diff --git a/openbsc/src/gprs/gb_proxy.c b/openbsc/src/gprs/gb_proxy.c index 2dfb4d82c..344e16448 100644 --- a/openbsc/src/gprs/gb_proxy.c +++ b/openbsc/src/gprs/gb_proxy.c @@ -494,10 +494,6 @@ static int gbprox_process_bssgp_ul(struct gbproxy_config *cfg, now = time(NULL); - if (parse_ctx.bssgp_raid_enc && parse_ctx.old_raid_enc && - memcmp(parse_ctx.bssgp_raid_enc, parse_ctx.old_raid_enc, 6) == 0) - parse_ctx.old_raid_matches = 1; - gbprox_update_current_raid(parse_ctx.bssgp_raid_enc, peer, parse_ctx.llc_msg_name); diff --git a/openbsc/src/gprs/gb_proxy_patch.c b/openbsc/src/gprs/gb_proxy_patch.c index be3ebd986..caedf8965 100644 --- a/openbsc/src/gprs/gb_proxy_patch.c +++ b/openbsc/src/gprs/gb_proxy_patch.c @@ -199,7 +199,8 @@ int gbproxy_patch_llc(struct msgb *msg, uint8_t *llc, size_t llc_len, int have_patched = 0; int fcs; - if (parse_ctx->ptmsi_enc && tlli_info) { + if (parse_ctx->ptmsi_enc && tlli_info && + !parse_ctx->old_raid_is_foreign) { uint32_t ptmsi; if (parse_ctx->to_bss) ptmsi = tlli_info->tlli.ptmsi; @@ -234,7 +235,7 @@ int gbproxy_patch_llc(struct msgb *msg, uint8_t *llc, size_t llc_len, have_patched = 1; } - if (parse_ctx->old_raid_enc && parse_ctx->old_raid_matches) { + if (parse_ctx->old_raid_enc && !parse_ctx->old_raid_is_foreign) { /* TODO: Patch to invalid if P-TMSI unknown. */ gbproxy_patch_raid(parse_ctx->old_raid_enc, peer, parse_ctx->to_bss, parse_ctx->llc_msg_name); diff --git a/openbsc/src/gprs/gprs_gb_parse.c b/openbsc/src/gprs/gprs_gb_parse.c index fe0881783..f361951a1 100644 --- a/openbsc/src/gprs/gprs_gb_parse.c +++ b/openbsc/src/gprs/gprs_gb_parse.c @@ -557,6 +557,10 @@ int gprs_gb_parse_bssgp(uint8_t *bssgp, size_t bssgp_len, parse_ctx->tlli = ntohl(tmp_tlli); } + if (parse_ctx->bssgp_raid_enc && parse_ctx->old_raid_enc && + memcmp(parse_ctx->bssgp_raid_enc, parse_ctx->old_raid_enc, 6) != 0) + parse_ctx->old_raid_is_foreign = 1; + return 1; } |