From 32dd2f3f9b689600dd0704ed4fb12614ebf962f9 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 1 Apr 2015 18:15:48 +0200 Subject: 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 --- openbsc/src/osmo-bsc/osmo_bsc_filter.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'openbsc/src/osmo-bsc/osmo_bsc_filter.c') 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, -- cgit v1.2.3