summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_virtual_ip_edit.php
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-08-31 12:47:58 +0000
committerErmal <eri@pfsense.org>2010-08-31 12:47:58 +0000
commit62a4abc92cd31983d4b1c09eb95d28e001d9869d (patch)
treede1338f9577d72401529455f45ee55a78f283e29 /usr/local/www/firewall_virtual_ip_edit.php
parent9dea60d1463b70e045bfd17b2e2068b4f0dee5db (diff)
downloadpfsense-62a4abc92cd31983d4b1c09eb95d28e001d9869d.zip
pfsense-62a4abc92cd31983d4b1c09eb95d28e001d9869d.tar.gz
Ticket #543. Do not allow to change an interface already configured to a type none if it is referenced by VIPs and also do not allow VIPs to be configured on an interface with type none. Maybe the latest should be relaxed to only disallow this for ipaliases?!
Diffstat (limited to 'usr/local/www/firewall_virtual_ip_edit.php')
-rwxr-xr-xusr/local/www/firewall_virtual_ip_edit.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr/local/www/firewall_virtual_ip_edit.php b/usr/local/www/firewall_virtual_ip_edit.php
index 8951435..214d127 100755
--- a/usr/local/www/firewall_virtual_ip_edit.php
+++ b/usr/local/www/firewall_virtual_ip_edit.php
@@ -109,9 +109,12 @@ if ($_POST) {
$input_errors[] = gettext("A valid IP address must be specified.");
$natiflist = get_configured_interface_with_descr();
- foreach ($natiflist as $natif => $natdescr)
+ foreach ($natiflist as $natif => $natdescr) {
+ if (empty($config['interfaces'][$natif]['ipaddr']))
+ $input_errors[] = gettext("The interface choosen for the VIP has no ip configured so it cannot be used as a parent for the VIP.");
if ($_POST['subnet'] == get_interface_ip($natif))
$input_errors[] = sprintf(gettext("The %s IP address may not be used in a virtual entry."),$natdescr);
+ }
if($_POST['subnet_bits'] == "32" and $_POST['type'] == "carp")
$input_errors[] = gettext("The /32 subnet mask is invalid for CARP IPs.");
OpenPOWER on IntegriCloud