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
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_filter.c b/openbsc/src/osmo-bsc/osmo_bsc_filter.c
index 596bfbd..58a57cd 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_filter.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_filter.c
@@ -311,6 +311,19 @@
 	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 @@
 	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,