diff options
Diffstat (limited to 'usr/local/www/load_balancer_virtual_server_edit.php')
-rw-r--r-- | usr/local/www/load_balancer_virtual_server_edit.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/usr/local/www/load_balancer_virtual_server_edit.php b/usr/local/www/load_balancer_virtual_server_edit.php index 8e6ffe8..50f59ed 100644 --- a/usr/local/www/load_balancer_virtual_server_edit.php +++ b/usr/local/www/load_balancer_virtual_server_edit.php @@ -69,6 +69,8 @@ if (isset($id) && $a_vs[$id]) { $changedesc = gettext("Load Balancer: Virtual Server:") . " "; $changecount = 0; +$allowed_protocols = array("tcp", "dns"); + if ($_POST) { unset($input_errors); $pconfig = $_POST; @@ -107,6 +109,10 @@ if ($_POST) { else if (is_subnetv4($_POST['ipaddr']) && subnet_size($_POST['ipaddr']) > 64) $input_errors[] = sprintf(gettext("%s is a subnet containing more than 64 IP addresses."), $_POST['ipaddr']); + if (!in_array($_POST['relay_protocol'], $allowed_protocols)) { + $input_errors[] = gettext("The submitted relay protocol is not valid."); + } + if ((strtolower($_POST['relay_protocol']) == "dns") && !empty($_POST['sitedown'])) $input_errors[] = gettext("You cannot select a Fall Back Pool when using the DNS relay protocol."); |