Harald Welte has submitted this change and it was merged.

Change subject: bsc_vty: Don't allow timers of zero (0)
......................................................................


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
---
M openbsc/src/libbsc/bsc_vty.c
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c
index b8352ce..bcd78e3 100644
--- a/openbsc/src/libbsc/bsc_vty.c
+++ b/openbsc/src/libbsc/bsc_vty.c
@@ -1544,14 +1544,14 @@
 #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;                             \

-- 
To view, visit https://gerrit.osmocom.org/3305
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I517828f2f0c80ec01cb63648db2626f17a67fe57
Gerrit-PatchSet: 2
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Jenkins Builder

Reply via email to