aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2020-10-15 19:17:10 +0200
committerneels <nhofmeyr@sysmocom.de>2020-10-16 13:51:48 +0000
commit60e5ddf65d50b3e430d29dd9b5cfdaf4d05f3204 (patch)
tree0143d9a2b8b69a90797a0c233c52295ca04b2c1c /src/osmo-bsc
parent7c02e4cfd5d664ff8491f3f42107440642b80af5 (diff)
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
Diffstat (limited to 'src/osmo-bsc')
-rw-r--r--src/osmo-bsc/bsc_vty.c30
-rw-r--r--src/osmo-bsc/osmo_bsc_filter.c29
-rw-r--r--src/osmo-bsc/osmo_bsc_msc.c6
3 files changed, 13 insertions, 52 deletions
diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index bdabe88ab..e91e01cc7 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -5976,12 +5976,6 @@ static void write_msc(struct vty *vty, struct bsc_msc_data *msc)
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 @@ DEFUN_ATTR(cfg_net_bsc_mcc,
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 f664231e8..497b3e4de 100644
--- a/src/osmo-bsc/osmo_bsc_filter.c
+++ b/src/osmo-bsc/osmo_bsc_filter.c
@@ -92,26 +92,11 @@ static int bsc_patch_mm_info(struct gsm_subscriber_connection *conn,
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 @@ int bsc_scan_msc_msg(struct gsm_subscriber_connection *conn, struct msgb *msg)
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 583b6ff23..772bea588 100644
--- a/src/osmo-bsc/osmo_bsc_msc.c
+++ b/src/osmo-bsc/osmo_bsc_msc.c
@@ -229,8 +229,6 @@ struct bsc_msc_data *osmo_msc_data_alloc(struct gsm_network *net, int nr)
.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 @@ struct osmo_cell_global_id *cgi_for_msc(struct bsc_msc_data *msc, struct gsm_bts
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;
}