From 5d1fa89819e57c41da84e9f2f0608d3ce4ce4a3d Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 20 Jul 2017 01:47:39 +0200 Subject: GSM timers: User reasonable defaults; don't save if equal default A number of the GSM timers (including T3109) had no reasonable default values if not specified in the VTY / config file. Together with unconditional writing to the config file, this created config files with a persistent setting for important timers as '0'. To make things worse, many of our example cofig files suffered from the same problem. Let's avoid this from happening by * having reasonable defaults if nothing specified in the config file * conditionally savingg timers only if they differ from default * reject any timer values that state zero during start-up (see previous commit) Change-Id: Iaac0bfca423852b61d8b9eb1438157ef00d0d8c8 Closes: OS#2380 --- include/openbsc/gsm_data.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/openbsc/gsm_data.h b/include/openbsc/gsm_data.h index c307fee6b..02823c969 100644 --- a/include/openbsc/gsm_data.h +++ b/include/openbsc/gsm_data.h @@ -323,10 +323,18 @@ enum gsm_auth_policy { GSM_AUTH_POLICY_REGEXP, /* accept IMSIs matching given regexp */ }; -#define GSM_T3101_DEFAULT 10 -#define GSM_T3105_DEFAULT 40 +#define GSM_T3101_DEFAULT 10 /* s */ +#define GSM_T3103_DEFAULT 5 /* s */ +#define GSM_T3105_DEFAULT 100 /* ms */ +#define GSM_T3107_DEFAULT 5 /* s */ +#define GSM_T3109_DEFAULT 19 /* s, must be 2s + radio_link_timeout*0.48 */ +#define GSM_T3111_DEFAULT 2 /* s */ #define GSM_T3113_DEFAULT 60 +#define GSM_T3115_DEFAULT 10 +#define GSM_T3117_DEFAULT 10 +#define GSM_T3119_DEFAULT 10 #define GSM_T3122_DEFAULT 10 +#define GSM_T3141_DEFAULT 10 struct gsm_tz { int override; /* if 0, use system's time zone instead. */ -- cgit v1.2.3