diff options
author | PiBa-NL <pba_2k3@yahoo.com> | 2012-09-24 02:05:30 +0200 |
---|---|---|
committer | PiBa-NL <pba_2k3@yahoo.com> | 2012-09-24 02:05:30 +0200 |
commit | 26a5f8c8ee3caf6941bc051c529a1f61f56f60db (patch) | |
tree | c052f10931a54cfb1d31fd009d024f45536b8176 | |
parent | 9e0f8e23e9a6c2138542a08fb4363fef3ecaa2a3 (diff) | |
download | pfsense-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.
-rwxr-xr-x | usr/local/www/firewall_virtual_ip_edit.php | 8 |
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) { |