summaryrefslogtreecommitdiffstats
path: root/etc/inc/vslb.inc
diff options
context:
space:
mode:
authorPierre POMES <pierre.pomes@gmail.com>2012-02-19 21:46:12 -0500
committerPierre POMES <pierre.pomes@gmail.com>2012-02-19 21:46:12 -0500
commit206aa9fc244e6581e35cbee3df0996a73318d2a9 (patch)
tree50c604cac729c6243a557561773578546f4a02e4 /etc/inc/vslb.inc
parent259f606eb8b186e2b1033036a11467c610188100 (diff)
downloadpfsense-206aa9fc244e6581e35cbee3df0996a73318d2a9.zip
pfsense-206aa9fc244e6581e35cbee3df0996a73318d2a9.tar.gz
Ticket #2205 - Add input validation, keep same logic as 2.0.1 and abore for default values
Diffstat (limited to 'etc/inc/vslb.inc')
-rw-r--r--etc/inc/vslb.inc18
1 files changed, 14 insertions, 4 deletions
diff --git a/etc/inc/vslb.inc b/etc/inc/vslb.inc
index dfe2705..2659197 100644
--- a/etc/inc/vslb.inc
+++ b/etc/inc/vslb.inc
@@ -197,14 +197,24 @@ function relayd_configure($kill_first=false) {
}
}
-
+
$fd = fopen("{$g['varetc_path']}/relayd.conf", "w");
+ $conf .= "log updates \n";
+
+ /* Global timeout and interval settings
+ if not specified by the user, use a 1000 ms timeout value as in pfsense 2.0.1 and above */
+ if (isset($setting['timeout']) && !empty($setting['timeout'])) {
+ $conf .= "timeout ".$setting['timeout']." \n";
+ } else {
+ $conf .= "timeout 1000 \n";
+ }
+
+ if (isset($setting['interval']) && !empty($setting['interval'])) {
+ $conf .= "interval ".$setting['interval']." \n";
+ }
/* reindex pools by name as we loop through the pools array */
$pools = array();
- $conf .= "log updates \n";
- $conf .= "timeout ".$setting['timeout']." \n";
- $conf .= "interval ".$setting['interval']." \n";
/* Virtual server pools */
if(is_array($pool_a)) {
for ($i = 0; isset($pool_a[$i]); $i++) {
OpenPOWER on IntegriCloud