summaryrefslogtreecommitdiffstats
path: root/usr/local/www/load_balancer_pool_edit.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-08-08 00:26:12 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-08-08 00:26:12 +0000
commitaffd363b1d3afa22353ebc690f59e83bdf17b05f (patch)
tree0cca53aac9db287e3e5eca63588dde402186374c /usr/local/www/load_balancer_pool_edit.php
parent3ea3dce5c0a614dc2f53c5f3725bf2bf5a0368b1 (diff)
downloadpfsense-affd363b1d3afa22353ebc690f59e83bdf17b05f.zip
pfsense-affd363b1d3afa22353ebc690f59e83bdf17b05f.tar.gz
Retrofit checks for gateway LB
Diffstat (limited to 'usr/local/www/load_balancer_pool_edit.php')
-rwxr-xr-xusr/local/www/load_balancer_pool_edit.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/usr/local/www/load_balancer_pool_edit.php b/usr/local/www/load_balancer_pool_edit.php
index ea551f1..c787177 100755
--- a/usr/local/www/load_balancer_pool_edit.php
+++ b/usr/local/www/load_balancer_pool_edit.php
@@ -76,11 +76,21 @@ if ($_POST) {
if (($_POST['name'] == $config['load_balancer']['lbpool'][$i]['name']) && ($i != $id))
$input_errors[] = "This pool name has already been used. Pool names must be unique.";
if (!is_port($_POST['port']))
+ if($POST['type'] == "server")
$input_errors[] = "The port must be an integer between 1 and 65535.";
if (is_array($_POST['servers'])) {
foreach($pconfig['servers'] as $svrent) {
- if (!is_ipaddr($svrent))
- $input_errors[] = "{$svrent} is not a valid IP address.";
+ if (!is_ipaddr($svrent)) {
+ if($POST['type'] == "server") {
+ $input_errors[] = "{$svrent} is not a valid IP address.";
+ } else {
+ $split_ip = split("|", $svrent);
+ if(!is_ipaddr($split_ip[0]))
+ $input_errors[] = "{$split_ip[0]} is not a valid IP address.";
+ if(!is_ipaddr($split_ip[1]))
+ $input_errors[] = "{$split_ip[1]} is not a valid IP address.";
+ }
+ }
}
}
if ($_POST['monitor'] != "TCP" && $_POST['monitor'] != "HTTP" && $_POST['monitor'] != "ICMP")
OpenPOWER on IntegriCloud