aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2013-06-13 09:35:05 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2014-01-21 15:54:26 +0100
commitc232e753718eceaf06e003ebe8561e2f1c127d8b (patch)
tree4b492fbf6abb93edab440678dccdc0cae238a608 /src
parentca15a5413d006431b5514b42619b8b7df3c85319 (diff)
Reject BTS attributes, if T3105 is set to 0ms
Diffstat (limited to 'src')
-rw-r--r--src/common/oml.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/common/oml.c b/src/common/oml.c
index 573f898d..c0fc53a3 100644
--- a/src/common/oml.c
+++ b/src/common/oml.c
@@ -510,9 +510,15 @@ static int oml_rx_set_bts_attr(struct gsm_bts *bts, struct msgb *msg)
}
/* 9.4.10 BTS Air Timer */
- if (TLVP_PRESENT(&tp, NM_ATT_BTS_AIR_TIMER)
- && *TLVP_VAL(&tp, NM_ATT_BTS_AIR_TIMER) > 0)
- btsb->t3105_ms = *TLVP_VAL(&tp, NM_ATT_BTS_AIR_TIMER) * 10;
+ if (TLVP_PRESENT(&tp, NM_ATT_BTS_AIR_TIMER)) {
+ uint8_t t3105 = *TLVP_VAL(&tp, NM_ATT_BTS_AIR_TIMER);
+ if (t3105 == 0) {
+ LOGP(DOML, LOGL_NOTICE,
+ "T3105 must have a value != 0.\n");
+ return oml_fom_ack_nack(msg, NM_NACK_PARAM_RANGE);
+ }
+ btsb->t3105_ms = t3105 * 10;
+ }
/* 9.4.37 NY1 */
if (TLVP_PRESENT(&tp, NM_ATT_NY1))