aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/rsl.c
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-10-11 13:53:25 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2021-10-11 13:53:27 +0200
commit3e2b7faed6d6e08f5be30e53c1f860482fc0bf89 (patch)
tree889e678a02880e18ab538497a74b0f64dad31391 /src/common/rsl.c
parent074672b6048ceca70cc3ebb9c1d0ba4c749a93c2 (diff)
rsl: Fix all shadow TS being Chan Act NACKed
The OML NM Channel FSM state only apply to primary timeslots, hence we need to make sure we pick the primary TS (the non-shadow one). Due to this bug, all channels on shadow TS where NACKed because the related state was never "Enabled Ok". Fixes: c97a7f51e1b15d40e39df4b7d07b3c6534540186 Related: OS#5249 Related: OS#5251 Change-Id: If47e4bdd45a05ed1b5709b6e3d541f2830723e37
Diffstat (limited to 'src/common/rsl.c')
-rw-r--r--src/common/rsl.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/common/rsl.c b/src/common/rsl.c
index 638caf85..b186adfe 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -1624,6 +1624,7 @@ static int rsl_rx_chan_activ(struct msgb *msg)
struct abis_rsl_dchan_hdr *dch = msgb_l2(msg);
struct gsm_lchan *lchan = msg->lchan;
struct gsm_bts_trx_ts *ts = lchan->ts;
+ struct gsm_bts_trx_ts *primary_ts;
struct tlv_parsed tp;
const struct tlv_p_entry *ie;
uint8_t type, cause;
@@ -1635,8 +1636,10 @@ static int rsl_rx_chan_activ(struct msgb *msg)
return rsl_tx_chan_act_nack(lchan, RSL_ERR_EQUIPMENT_FAIL);
}
- if (ts->mo.nm_state.operational != NM_OPSTATE_ENABLED ||
- ts->mo.nm_state.availability != NM_AVSTATE_OK) {
+ /* We need to pick the real TS here to check NM state: */
+ primary_ts = ts->vamos.is_shadow ? ts->vamos.peer : ts;
+ if (primary_ts->mo.nm_state.operational != NM_OPSTATE_ENABLED ||
+ primary_ts->mo.nm_state.availability != NM_AVSTATE_OK) {
LOGP(DRSL, LOGL_ERROR, "%s rx chan activ but TS not in nm_state oper=ENABLED avail=OK, nack!\n",
gsm_ts_and_pchan_name(ts));
return rsl_tx_chan_act_nack(lchan, RSL_ERR_RR_UNAVAIL);