aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-04-07 23:35:15 +0300
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-04-21 00:23:05 +0300
commit0fb9517fede192dd83f528ec7ab73c30640b1e75 (patch)
treec8a031e5be171e0a39adadca3fcc5cb7c692da46
parent1422a80cae4fff5b2c671ef3c134b7138c058507 (diff)
VTY: fix NULL-pointer dereference in 'show transceiver'
-rw-r--r--src/osmo-bts-trx/trx_vty.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/osmo-bts-trx/trx_vty.c b/src/osmo-bts-trx/trx_vty.c
index bd6b3b1b..70e9b361 100644
--- a/src/osmo-bts-trx/trx_vty.c
+++ b/src/osmo-bts-trx/trx_vty.c
@@ -89,11 +89,16 @@ DEFUN(show_transceiver, show_transceiver_cmd, "show transceiver",
else
vty_out(vty, " bsic : undefined%s", VTY_NEWLINE);
+ /* trx->ts[tn].priv is NULL in absence of the A-bis connection */
+ if (trx->rsl_link == NULL)
+ continue;
+
for (tn = 0; tn < ARRAY_SIZE(trx->ts); tn++) {
const struct gsm_bts_trx_ts *ts = &trx->ts[tn];
const struct l1sched_ts *l1ts = ts->priv;
const struct trx_sched_multiframe *mf;
+ OSMO_ASSERT(l1ts != NULL);
mf = &trx_sched_multiframes[l1ts->mf_index];
vty_out(vty, " timeslot #%u (%s)%s",