Change in osmo-bsc[master]: drop features 'core-location-area-code' and 'core-cell-identity'

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

neels gerrit-no-reply at lists.osmocom.org
Thu Oct 15 17:19:31 UTC 2020


neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/20671 )


Change subject: drop features 'core-location-area-code' and 'core-cell-identity'
......................................................................

drop features 'core-location-area-code' and 'core-cell-identity'

This feature apparently assigned a fixed LAC and CI to a specific MSC, but
looking at the implementation was obviously not useful.

Keep the vty commands for legacy compat, now without effect besides logging an
error via vty_out().

Related: OS#4751
Change-Id: I6bee704e7e5d5b6b86473323bae1fa9fce9241ee
---
M include/osmocom/bsc/bsc_msc_data.h
M src/osmo-bsc/bsc_vty.c
M src/osmo-bsc/osmo_bsc_filter.c
M src/osmo-bsc/osmo_bsc_msc.c
4 files changed, 13 insertions(+), 54 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/71/20671/1

diff --git a/include/osmocom/bsc/bsc_msc_data.h b/include/osmocom/bsc/bsc_msc_data.h
index 5699b77..38e0d93 100644
--- a/include/osmocom/bsc/bsc_msc_data.h
+++ b/include/osmocom/bsc/bsc_msc_data.h
@@ -128,8 +128,6 @@
 
 	/* Connection data */
 	struct osmo_plmn_id core_plmn;
-	int core_lac;
-	int core_ci;
 
 	/* audio codecs */
 	struct gsm48_multi_rate_conf amr_conf;
diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index f4baefb..c6a95f5 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -5976,12 +5976,6 @@
 	if (msc->core_plmn.mcc != GSM_MCC_MNC_INVALID)
 		vty_out(vty, " core-mobile-country-code %s%s",
 			osmo_mcc_name(msc->core_plmn.mcc), VTY_NEWLINE);
-	if (msc->core_lac != -1)
-		vty_out(vty, " core-location-area-code %d%s",
-			msc->core_lac, VTY_NEWLINE);
-	if (msc->core_ci != -1)
-		vty_out(vty, " core-cell-identity %d%s",
-			msc->core_ci, VTY_NEWLINE);
 
 	if (msc->audio_length != 0) {
 		int i;
@@ -6105,25 +6099,21 @@
 	return CMD_SUCCESS;
 }
 
-DEFUN_ATTR(cfg_net_bsc_lac,
-	   cfg_net_bsc_lac_cmd,
-	   "core-location-area-code <0-65535>",
-	   "Use this location area code for the core network\n" "LAC value\n",
-	   CMD_ATTR_IMMEDIATE)
+DEFUN_DEPRECATED(cfg_net_bsc_lac,
+		 cfg_net_bsc_lac_cmd,
+		 "core-location-area-code <0-65535>",
+		 "Legacy configuration that no longer has any effect\n-\n")
 {
-	struct bsc_msc_data *data = bsc_msc_data(vty);
-	data->core_lac = atoi(argv[0]);
+	vty_out(vty, "%% Deprecated 'core-location-area-code' config no longer has any effect%s", VTY_NEWLINE);
 	return CMD_SUCCESS;
 }
 
-DEFUN_ATTR(cfg_net_bsc_ci,
-	   cfg_net_bsc_ci_cmd,
-	   "core-cell-identity <0-65535>",
-	   "Use this cell identity for the core network\n" "CI value\n",
-	   CMD_ATTR_IMMEDIATE)
+DEFUN_DEPRECATED(cfg_net_bsc_ci,
+		 cfg_net_bsc_ci_cmd,
+		 "core-cell-identity <0-65535>",
+		 "Legacy configuration that no longer has any effect\n-\n")
 {
-	struct bsc_msc_data *data = bsc_msc_data(vty);
-	data->core_ci = atoi(argv[0]);
+	vty_out(vty, "%% Deprecated 'core-cell-identity' config no longer has any effect%s", VTY_NEWLINE);
 	return CMD_SUCCESS;
 }
 
diff --git a/src/osmo-bsc/osmo_bsc_filter.c b/src/osmo-bsc/osmo_bsc_filter.c
index f664231..497b3e4 100644
--- a/src/osmo-bsc/osmo_bsc_filter.c
+++ b/src/osmo-bsc/osmo_bsc_filter.c
@@ -92,26 +92,11 @@
 	return 0;
 }
 
-static int has_core_identity(struct bsc_msc_data *msc)
-{
-	if (msc->core_plmn.mnc != GSM_MCC_MNC_INVALID)
-		return 1;
-	if (msc->core_plmn.mcc != GSM_MCC_MNC_INVALID)
-		return 1;
-	if (msc->core_lac != -1)
-		return 1;
-	if (msc->core_ci != -1)
-		return 1;
-	return 0;
-}
-
 /**
  * Messages coming back from the MSC.
  */
 int bsc_scan_msc_msg(struct gsm_subscriber_connection *conn, struct msgb *msg)
 {
-	struct bsc_msc_data *msc;
-	struct gsm48_loc_area_id *lai;
 	struct gsm48_hdr *gh;
 	uint8_t pdisc;
 	uint8_t mtype;
@@ -130,19 +115,7 @@
 		return 0;
 
 	mtype = gsm48_hdr_msg_type(gh);
-	msc = conn->sccp.msc;
-
-	if (mtype == GSM48_MT_MM_LOC_UPD_ACCEPT) {
-		struct gsm_bts *bts = conn_get_bts(conn);
-		if (bts && has_core_identity(msc)) {
-			if (msgb_l3len(msg) >= sizeof(*gh) + sizeof(*lai)) {
-				/* overwrite LAI in the message */
-				lai = (struct gsm48_loc_area_id *) &gh->data[0];
-				gsm48_generate_lai2(lai, bts_lai(bts));
-			}
-		}
-		return 0;
-	} else if (mtype == GSM48_MT_MM_INFO) {
+	if (mtype == GSM48_MT_MM_INFO) {
 		bsc_patch_mm_info(conn, &gh->data[0], length);
 	}
 
diff --git a/src/osmo-bsc/osmo_bsc_msc.c b/src/osmo-bsc/osmo_bsc_msc.c
index 583b6ff..772bea5 100644
--- a/src/osmo-bsc/osmo_bsc_msc.c
+++ b/src/osmo-bsc/osmo_bsc_msc.c
@@ -229,8 +229,6 @@
 		.mcc = GSM_MCC_MNC_INVALID,
 		.mnc = GSM_MCC_MNC_INVALID,
 	};
-	msc_data->core_ci = -1;
-	msc_data->core_lac = -1;
 
 	msc_data->nr = nr;
 	msc_data->allow_emerg = 1;
@@ -285,8 +283,8 @@
 		cgi.lai.plmn.mnc = msc->core_plmn.mnc;
 		cgi.lai.plmn.mnc_3_digits = msc->core_plmn.mnc_3_digits;
 	}
-	cgi.lai.lac = (msc->core_lac != -1) ? msc->core_lac : bts->location_area_code;
-	cgi.cell_identity = (msc->core_ci != -1) ? msc->core_ci : bts->cell_identity;
+	cgi.lai.lac = bts->location_area_code;
+	cgi.cell_identity = bts->cell_identity;
 
 	return &cgi;
 }

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/20671
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I6bee704e7e5d5b6b86473323bae1fa9fce9241ee
Gerrit-Change-Number: 20671
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201015/0f99db1d/attachment.htm>


More information about the gerrit-log mailing list