aboutsummaryrefslogtreecommitdiffstats
path: root/src/libbsc/bsc_vty.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-07-20 01:19:18 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2017-08-27 03:52:46 +0200
commitbb871000921ccc9633088006a188918d325ea30d (patch)
tree1cf2fc405c50a0b91ce6ba516953d434c8e54bac /src/libbsc/bsc_vty.c
parenta0d324b3d01306e7ca9f663f06a5ccb7342b6459 (diff)
bsc_vty: Don't allow timers of zero (0)
It typically doesn't make sense to configure any of the GSM RR timer to 0 (Seconds). In fact, accidentially configuring any of the timers to zero might have severe side effects, such as "stuck channels" described in https://osmocom.org/issues/2380 Change-Id: I517828f2f0c80ec01cb63648db2626f17a67fe57
Diffstat (limited to 'src/libbsc/bsc_vty.c')
-rw-r--r--src/libbsc/bsc_vty.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c
index 1e78b08b1..bf7c3cac5 100644
--- a/src/libbsc/bsc_vty.c
+++ b/src/libbsc/bsc_vty.c
@@ -1543,14 +1543,14 @@ DEFUN(cfg_net_pag_any_tch,
#define DECLARE_TIMER(number, doc) \
DEFUN(cfg_net_T##number, \
cfg_net_T##number##_cmd, \
- "timer t" #number " <0-65535>", \
+ "timer t" #number " <1-65535>", \
"Configure GSM Timers\n" \
doc "Timer Value in seconds\n") \
{ \
struct gsm_network *gsmnet = gsmnet_from_vty(vty); \
int value = atoi(argv[0]); \
\
- if (value < 0 || value > 65535) { \
+ if (value < 1 || value > 65535) { \
vty_out(vty, "Timer value %s out of range.%s", \
argv[0], VTY_NEWLINE); \
return CMD_WARNING; \