Change in osmo-bsc[master]: Ignore CHANnel ReQuireD with Access Delay IE > 63

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/.

laforge gerrit-no-reply at lists.osmocom.org
Sun Apr 4 16:20:04 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/23574 )

Change subject: Ignore CHANnel ReQuireD with Access Delay IE > 63
......................................................................

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
---
M include/osmocom/bsc/bts.h
M src/osmo-bsc/abis_rsl.c
M src/osmo-bsc/bsc_vty.c
M src/osmo-bsc/bts.c
4 files changed, 33 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, approved



diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h
index f40aa3e..c8cf8b3 100644
--- a/include/osmocom/bsc/bts.h
+++ b/include/osmocom/bsc/bts.h
@@ -28,6 +28,7 @@
 	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 @@
 	/* 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 67e7d27..6445b6d 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -1526,6 +1526,13 @@
 		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 280fe9f..91eaee0 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -433,6 +433,8 @@
 	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 @@
 	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 @@
 	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 @@
 	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 398f26f..b5b7136 100644
--- a/src/osmo-bsc/bts.c
+++ b/src/osmo-bsc/bts.c
@@ -357,6 +357,8 @@
 	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 @@
 	[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" },

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ie8987bcc0e43921bc753162b77a0efc68799b3ce
Gerrit-Change-Number: 23574
Gerrit-PatchSet: 8
Gerrit-Owner: keith <keith at rhizomatica.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210404/6ef4ed0c/attachment.htm>


More information about the gerrit-log mailing list