summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_virtual_ip_edit.php
diff options
context:
space:
mode:
authorPiBa-NL <pba_2k3@yahoo.com>2012-09-24 02:05:30 +0200
committerPiBa-NL <pba_2k3@yahoo.com>2012-09-24 02:05:30 +0200
commit26a5f8c8ee3caf6941bc051c529a1f61f56f60db (patch)
treec052f10931a54cfb1d31fd009d024f45536b8176 /usr/local/www/firewall_virtual_ip_edit.php
parent9e0f8e23e9a6c2138542a08fb4363fef3ecaa2a3 (diff)
downloadpfsense-26a5f8c8ee3caf6941bc051c529a1f61f56f60db.zip
pfsense-26a5f8c8ee3caf6941bc051c529a1f61f56f60db.tar.gz
fix warning message for CARP /32 /128 masks added /31 /127 as these are also not applicable for carp which needs at least 3 IP's to function.
Diffstat (limited to 'usr/local/www/firewall_virtual_ip_edit.php')
-rwxr-xr-xusr/local/www/firewall_virtual_ip_edit.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr/local/www/firewall_virtual_ip_edit.php b/usr/local/www/firewall_virtual_ip_edit.php
index b82a623..ad05cdf 100755
--- a/usr/local/www/firewall_virtual_ip_edit.php
+++ b/usr/local/www/firewall_virtual_ip_edit.php
@@ -122,12 +122,12 @@ if ($_POST) {
}
if(is_ipaddrv4($_POST['subnet'])) {
- if($_POST['subnet_bits'] == "32" and $_POST['type'] == "carp")
- $input_errors[] = gettext("The /32 subnet mask is invalid for CARP IPs.");
+ if(($_POST['subnet_bits'] == "31" or $_POST['subnet_bits'] == "32") and $_POST['mode'] == "carp")
+ $input_errors[] = gettext("The /31 and /32 subnet mask are invalid for CARP IPs.");
}
if(is_ipaddrv6($_POST['subnet'])) {
- if($_POST['subnet_bits'] == "128" and $_POST['type'] == "carp")
- $input_errors[] = gettext("The /128 subnet mask is invalid for CARP IPs.");
+ if(($_POST['subnet_bits'] == "127" or $_POST['subnet_bits'] == "128") and $_POST['mode'] == "carp")
+ $input_errors[] = gettext("The /127 and /128 subnet mask are invalid for CARP IPs.");
}
/* check for overlaps with other virtual IP */
foreach ($a_vip as $vipent) {
OpenPOWER on IntegriCloud