aboutsummaryrefslogtreecommitdiffstats
path: root/config/varnish3/varnish.inc
diff options
context:
space:
mode:
authorMarcello Coutinho <marcellocoutinho@gmail.com>2013-12-09 18:15:18 -0200
committerMarcello Coutinho <marcellocoutinho@gmail.com>2013-12-09 18:15:18 -0200
commit37adca57db41b835b80d8e9eea5545dd6cb694b1 (patch)
tree252ff04e5885f5e99852fe59b278e76e9e113a71 /config/varnish3/varnish.inc
parent694e9f735bb16c7fed83bb26ecaff2ec05a4e1ce (diff)
downloadpfsense-packages-37adca57db41b835b80d8e9eea5545dd6cb694b1.tar.gz
pfsense-packages-37adca57db41b835b80d8e9eea5545dd6cb694b1.tar.bz2
pfsense-packages-37adca57db41b835b80d8e9eea5545dd6cb694b1.zip
varnish3 - fix save lb_director save error on pfsense 2.1
Diffstat (limited to 'config/varnish3/varnish.inc')
-rw-r--r--config/varnish3/varnish.inc7
1 files changed, 6 insertions, 1 deletions
diff --git a/config/varnish3/varnish.inc b/config/varnish3/varnish.inc
index 983804c9..1895d214 100644
--- a/config/varnish3/varnish.inc
+++ b/config/varnish3/varnish.inc
@@ -65,8 +65,13 @@ function varnish_settings_post_validate($post, $input_errors) {
}
function varnish_lb_directors_post_validate($post, $input_errors) {
- if (preg_match("/[^a-zA-Z0-9]/", $post['directorname']))
+ if (preg_match("/[^a-zA-Z0-9]/", $post['directorname'])){
$input_errors[] = "The directorname name must only contain the characters a-Z or 0-9";
+ }
+ else{
+ if(empty($post['failover']))
+ $_POST['failover'] = $post['directorname'];
+ }
if(stristr($post['directorurl'], 'http'))
$input_errors[] = "You do not need to include the http:// string in the director URL";
if($post['grace'] && ! preg_match("/^\d+(h|m|s)$/",$post['grace']))