diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-04-01 18:15:48 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-04-01 19:26:12 +0200 |
commit | 32dd2f3f9b689600dd0704ed4fb12614ebf962f9 (patch) | |
tree | 8428ceb1e9ca251ba8c21e03111a9fe6285e6037 /openbsc/src/osmo-bsc/osmo_bsc_filter.c | |
parent | 7cce1d301aff586d8a95765d3b56c0c81266781b (diff) |
bsc: Allow to use different LAC/CI for the core-network
We need to use different LAC/CI towards the core network.
It is a bit problematic as LAC/CI is a per BTS attribute
so this feature only works if a BSC manages everything in
the same LAC.
Related: SYS#1398
Diffstat (limited to 'openbsc/src/osmo-bsc/osmo_bsc_filter.c')
-rw-r--r-- | openbsc/src/osmo-bsc/osmo_bsc_filter.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_filter.c b/openbsc/src/osmo-bsc/osmo_bsc_filter.c index 596bfbdc1..58a57cdea 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_filter.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_filter.c @@ -311,6 +311,19 @@ static int bsc_patch_mm_info(struct gsm_subscriber_connection *conn, return 0; } +static int has_core_identity(struct osmo_msc_data *msc) +{ + if (msc->core_ncc != -1) + return 1; + if (msc->core_mcc != -1) + return 1; + if (msc->core_lac != -1) + return 1; + if (msc->core_ci != -1) + return 1; + return 0; +} + /** * Messages coming back from the MSC. */ @@ -336,7 +349,7 @@ int bsc_scan_msc_msg(struct gsm_subscriber_connection *conn, struct msgb *msg) msc = conn->sccp_con->msc; if (mtype == GSM48_MT_MM_LOC_UPD_ACCEPT) { - if (msc->core_ncc != -1 || msc->core_mcc != -1) { + if (has_core_identity(msc)) { if (msgb_l3len(msg) >= sizeof(*gh) + sizeof(*lai)) { lai = (struct gsm48_loc_area_id *) &gh->data[0]; gsm48_generate_lai(lai, net->country_code, |