diff options
authorNeels Hofmeyr <neels@hofmeyr.de>2018-05-08 21:26:36 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2018-05-08 22:14:52 +0200
commitba7ed220be8efca14970f5701b3167aaab71de64 (patch)
parent0958278fb9910f4d697aece07d9865ed1db41773 (diff)
fix RSL Chan Activ Nack messages
In early rsl_rx_chan_activ(), do not use rsl_tx_chan_act_acknack() to trigger sending a NACK, instead use rsl_tx_chan_act_nack() directly. Rationale: the previously used rsl_tx_chan_act_acknack() may decide to omit the NACK, particularly based on the lchan->rel_act_kind. lchan->rel_act_kind indicates whether the Chan Release or Activation was explicitly requested via RSL, and thus whether an ACK/NACK should go back to RSL or not. This gets set only late in rsl_rx_chan_activ(). We cannot set it on top, because we need to first establish whether the Chan Activ is permitted or not. In case of early rejection of the Chan Activ, we do not want to modify the lchan state, but merely reply with a NACK, unconditionally. Before this patch, NACKs that rsl_rx_chan_activ() wants to trigger would possibly be not be sent out on RSL, because lchan->rel_act_kind is not explicitly initialized until later. Fixes: BTS_Tests.TC_dyn_ipa_pdch_act_tchf_act_nack Change-Id: Ic981f768cc024f0acd3d7ae55846cfbc7bc089ce
1 files changed, 4 insertions, 6 deletions
diff --git a/src/common/rsl.c b/src/common/rsl.c
index a09d3a2..c3e9604 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -966,7 +966,7 @@ static int rsl_rx_chan_activ(struct msgb *msg)
"%s: error: lchan is not available, but in state: %s.\n",
gsm_lchan_name(lchan), gsm_lchans_name(lchan->state));
- return rsl_tx_chan_act_acknack(lchan, RSL_ERR_EQUIPMENT_FAIL);
+ return rsl_tx_chan_act_nack(lchan, RSL_ERR_EQUIPMENT_FAIL);
if (ts->pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH) {
@@ -981,8 +981,7 @@ static int rsl_rx_chan_activ(struct msgb *msg)
rc = dyn_ts_l1_reconnect(ts, msg);
if (rc)
- return rsl_tx_chan_act_acknack(lchan,
+ return rsl_tx_chan_act_nack(lchan, RSL_ERR_NORMAL_UNSPEC);
/* indicate that the msgb should not be freed. */
return 1;
@@ -998,7 +997,7 @@ static int rsl_rx_chan_activ(struct msgb *msg)
/* 9.3.3 Activation Type */
LOGP(DRSL, LOGL_NOTICE, "missing Activation Type\n");
- return rsl_tx_chan_act_acknack(lchan, RSL_ERR_MAND_IE_ERROR);
+ return rsl_tx_chan_act_nack(lchan, RSL_ERR_MAND_IE_ERROR);
type = *TLVP_VAL(&tp, RSL_IE_ACT_TYPE);
@@ -1006,8 +1005,7 @@ static int rsl_rx_chan_activ(struct msgb *msg)
if (type != RSL_ACT_OSMO_PDCH) {
LOGP(DRSL, LOGL_NOTICE, "missing Channel Mode\n");
- return rsl_tx_chan_act_acknack(lchan,
+ return rsl_tx_chan_act_nack(lchan, RSL_ERR_MAND_IE_ERROR);
cm = (struct rsl_ie_chan_mode *) TLVP_VAL(&tp, RSL_IE_CHAN_MODE);
lchan_tchmode_from_cmode(lchan, cm);