aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-05-09 20:03:38 +0200
committerHarald Welte <laforge@gnumonks.org>2018-05-09 20:34:44 +0000
commitd241f9826298898619f6ed1841d31d6a9288c99d (patch)
tree5b3e1a954744cbcc0a7872e326bbab402b519d49
parent95d66c2d68b08527220ecdff70628e34f4f67f4c (diff)
rsl: If CHAN ACT or MODE MODIF fails, send respective NACK
The existign code only sent an ERROR REPORT, but it failed to actually send a proper NACK to the related request. This is confusing, as the operation should always be ACKed or NACKed, and not simply result in no response. Change-Id: Ic374a8e5e239ffe37082a54cdb94cb6ac9723e83 Closes: OS#3254
-rw-r--r--src/common/rsl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/common/rsl.c b/src/common/rsl.c
index 4d8279c0..5dd2c59f 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -1032,8 +1032,8 @@ static int rsl_rx_chan_activ(struct msgb *msg)
const uint8_t *val = TLVP_VAL(&tp, RSL_IE_ENCR_INFO);
if (encr_info2lchan(lchan, val, len) < 0) {
- return rsl_tx_error_report(msg->trx, RSL_ERR_IE_CONTENT,
- &dch->chan_nr, NULL, msg);
+ rsl_tx_error_report(msg->trx, RSL_ERR_IE_CONTENT, &dch->chan_nr, NULL, msg);
+ return rsl_tx_chan_act_acknack(lchan, RSL_ERR_ENCR_UNIMPL);
}
} else
memset(&lchan->encr, 0, sizeof(lchan->encr));
@@ -1476,8 +1476,8 @@ static int rsl_rx_mode_modif(struct msgb *msg)
const uint8_t *val = TLVP_VAL(&tp, RSL_IE_ENCR_INFO);
if (encr_info2lchan(lchan, val, len) < 0) {
- return rsl_tx_error_report(msg->trx, RSL_ERR_IE_CONTENT, &dch->chan_nr,
- NULL, msg);
+ rsl_tx_error_report(msg->trx, RSL_ERR_IE_CONTENT, &dch->chan_nr, NULL, msg);
+ return rsl_tx_mode_modif_nack(lchan, RSL_ERR_ENCR_UNIMPL);
}
}