aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith <keith@rhizomatica.org>2021-04-01 09:37:24 +0200
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2021-04-04 15:39:53 +0200
commit1823f89c1eae49960d036d2a48abf0de6a3add8d (patch)
treee69b77c7fec50c99400c807b82b50ba4ac8353b2
parent764449ec2ea6d6b45239278eae90613df8c93f59 (diff)
Ignore CHANnel ReQuireD with Access Delay IE > 63
It is observed that a CHANnel ReQuireD with access delay greater than 63 can be received from the Ericsson RBS. This results in osmo-bsc sending back a CHANnel ACTIVation with a Timing Advance IE containing the access delay value. The RBS NACKs this, leading to a BORKEN Channel. This patch makes the maximum acceptable access delay vty-configurable and Ignores CHANnel ReQuireD RSL Messages with Access Delay IE greater than that configured. Default value is 63. Related: OS#5096 Change-Id: Ie8987bcc0e43921bc753162b77a0efc68799b3ce
-rw-r--r--include/osmocom/bsc/bts.h4
-rw-r--r--src/osmo-bsc/abis_rsl.c7
-rw-r--r--src/osmo-bsc/bsc_vty.c17
-rw-r--r--src/osmo-bsc/bts.c5
4 files changed, 33 insertions, 0 deletions
diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h
index f40aa3ec2..c8cf8b330 100644
--- a/include/osmocom/bsc/bts.h
+++ b/include/osmocom/bsc/bts.h
@@ -28,6 +28,7 @@ enum bts_counter_id {
BTS_CTR_CHREQ_ATTEMPTED_UNKNOWN,
BTS_CTR_CHREQ_SUCCESSFUL,
BTS_CTR_CHREQ_NO_CHANNEL,
+ BTS_CTR_CHREQ_MAX_DELAY_EXCEEDED,
BTS_CTR_CHAN_RF_FAIL,
BTS_CTR_CHAN_RF_FAIL_TCH,
BTS_CTR_CHAN_RF_FAIL_SDCCH,
@@ -529,6 +530,9 @@ struct gsm_bts {
/* MS/BS Power Control parameters */
struct gsm_power_ctrl_params ms_power_ctrl;
struct gsm_power_ctrl_params bs_power_ctrl;
+
+ /* We will ignore CHAN RQD with access delay greater than rach_max_delay */
+ uint8_t rach_max_delay;
};
#define GSM_BTS_SI2Q(bts, i) (struct gsm48_system_information_type_2quater *)((bts)->si_buf[SYSINFO_TYPE_2quater][i])
diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index 67e7d27bc..6445b6deb 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -1526,6 +1526,13 @@ static int rsl_rx_chan_rqd(struct msgb *msg)
return -EINVAL;
}
rqd->ta = rqd_hdr->data[sizeof(struct gsm48_req_ref)+2];
+ if (rqd->ta > bts->rach_max_delay) {
+ LOG_BTS(bts, DRSL, LOGL_INFO, "Ignoring CHAN RQD: Access Delay(%d) greater than %u\n",
+ rqd->ta, bts->rach_max_delay);
+ rate_ctr_inc(&bts->bts_ctrs->ctr[BTS_CTR_CHREQ_MAX_DELAY_EXCEEDED]);
+ talloc_free(rqd);
+ return -EINVAL;
+ }
/* Determine channel request cause code */
rqd->reason = get_reason_by_chreq(rqd->ref.ra, bts->network->neci);
diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index 280fe9fa9..91eaee01d 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -433,6 +433,8 @@ static void bts_dump_vty(struct vty *vty, struct gsm_bts *bts)
vty_out(vty, " RACH Max transmissions: %u%s",
rach_max_trans_raw2val(bts->si_common.rach_control.max_trans),
VTY_NEWLINE);
+ vty_out(vty, " RACH Max Delay (Max Access Delay IE in CHANnel ReQuireD): %u%s",
+ bts->rach_max_delay, VTY_NEWLINE);
if (bts->si_common.rach_control.cell_bar)
vty_out(vty, " CELL IS BARRED%s", VTY_NEWLINE);
if (bts->dtxu != GSM48_DTX_SHALL_NOT_BE_USED)
@@ -1041,6 +1043,7 @@ static void config_write_bts_single(struct vty *vty, struct gsm_bts *bts)
vty_out(vty, " rach max transmission %u%s",
rach_max_trans_raw2val(bts->si_common.rach_control.max_trans),
VTY_NEWLINE);
+ vty_out(vty, " rach max-delay %u%s", bts->rach_max_delay, VTY_NEWLINE);
vty_out(vty, " channel-description attach %u%s",
bts->si_common.chan_desc.att, VTY_NEWLINE);
@@ -2746,6 +2749,19 @@ DEFUN_USRATTR(cfg_bts_rach_max_trans,
return CMD_SUCCESS;
}
+DEFUN_ATTR(cfg_bts_rach_max_delay,
+ cfg_bts_rach_max_delay_cmd,
+ "rach max-delay <1-127>",
+ RACH_STR
+ "Set the max Access Delay IE value to accept in CHANnel ReQuireD\n"
+ "Maximum Access Delay IE value to accept in CHANnel ReQuireD\n",
+ CMD_ATTR_IMMEDIATE)
+{
+ struct gsm_bts *bts = vty->index;
+ bts->rach_max_delay = atoi(argv[0]);
+ return CMD_SUCCESS;
+}
+
#define REP_ACCH_STR "FACCH/SACCH repetition\n"
DEFUN_USRATTR(cfg_bts_rep_dl_facch,
@@ -7668,6 +7684,7 @@ int bsc_vty_init(struct gsm_network *network)
install_element(BTS_NODE, &cfg_bts_challoc_cmd);
install_element(BTS_NODE, &cfg_bts_rach_tx_integer_cmd);
install_element(BTS_NODE, &cfg_bts_rach_max_trans_cmd);
+ install_element(BTS_NODE, &cfg_bts_rach_max_delay_cmd);
install_element(BTS_NODE, &cfg_bts_chan_desc_att_cmd);
install_element(BTS_NODE, &cfg_bts_chan_dscr_att_cmd);
install_element(BTS_NODE, &cfg_bts_chan_desc_bs_pa_mfrms_cmd);
diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c
index 398f26f67..b5b7136cc 100644
--- a/src/osmo-bsc/bts.c
+++ b/src/osmo-bsc/bts.c
@@ -357,6 +357,8 @@ struct gsm_bts *gsm_bts_alloc(struct gsm_network *net, struct gsm_bts_sm *bts_sm
bts->bs_power_ctrl = power_ctrl_params_def;
bts->bs_power_ctrl.dir = GSM_PWR_CTRL_DIR_DL;
+ bts->rach_max_delay = 63;
+
return bts;
}
@@ -767,6 +769,9 @@ const struct rate_ctr_desc bts_ctr_description[] = {
[BTS_CTR_CHREQ_NO_CHANNEL] = \
{ "chreq:no_channel",
"Sent to MS no channel available" },
+ [BTS_CTR_CHREQ_MAX_DELAY_EXCEEDED] = \
+ { "chreq:max_delay_exceeded",
+ "Received channel requests with greater than permitted access delay" },
[BTS_CTR_CHAN_RF_FAIL] = \
{ "chan:rf_fail",
"Received a RF failure indication from BTS" },