summaryrefslogtreecommitdiffstats
path: root/usr/local/www/load_balancer_pool_edit.php
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local/www/load_balancer_pool_edit.php')
-rw-r--r--usr/local/www/load_balancer_pool_edit.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/usr/local/www/load_balancer_pool_edit.php b/usr/local/www/load_balancer_pool_edit.php
index 457087b..72f36ce 100644
--- a/usr/local/www/load_balancer_pool_edit.php
+++ b/usr/local/www/load_balancer_pool_edit.php
@@ -74,6 +74,8 @@ if (isset($id) && $a_pool[$id]) {
$changedesc = gettext("Load Balancer: Pool:") . " ";
$changecount = 0;
+$allowed_modes = array("loadbalance", "failover");
+
if ($_POST) {
$changecount++;
@@ -110,6 +112,10 @@ if ($_POST) {
if (!empty($_POST['retry']) && !is_port($_POST['retry']))
$input_errors[] = gettext("The retry value must be an integer between 1 and 65535.");
+ if (!in_array($_POST['mode'], $allowed_modes)) {
+ $input_errors[] = gettext("The submitted mode is not valid.");
+ }
+
if (is_array($_POST['servers'])) {
foreach($pconfig['servers'] as $svrent) {
if (!is_ipaddr($svrent) && !is_subnetv4($svrent)) {
OpenPOWER on IntegriCloud