summaryrefslogtreecommitdiffstats
path: root/usr/local/www
diff options
context:
space:
mode:
authorJim P <jim@pingle.org>2012-09-23 17:18:47 -0700
committerJim P <jim@pingle.org>2012-09-23 17:18:47 -0700
commit489a6e7f04d3e15997605a7c5f137c4ad3b6dbee (patch)
tree8f9dd9f74fc912c2e4006ebe0206e207b896f117 /usr/local/www
parent362c9bb03f1d321e00d78d7b89b9c7ccc628b4cd (diff)
parent26a5f8c8ee3caf6941bc051c529a1f61f56f60db (diff)
downloadpfsense-489a6e7f04d3e15997605a7c5f137c4ad3b6dbee.zip
pfsense-489a6e7f04d3e15997605a7c5f137c4ad3b6dbee.tar.gz
Merge pull request #228 from PiBa-NL/master
fix few issues in virtual IP edit page
Diffstat (limited to 'usr/local/www')
-rwxr-xr-xusr/local/www/firewall_virtual_ip_edit.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr/local/www/firewall_virtual_ip_edit.php b/usr/local/www/firewall_virtual_ip_edit.php
index 6b7d6ef..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) {
@@ -359,7 +359,7 @@ function typesel_change() {
<input name="mode" type="radio" onclick="enable_change()" value="carp"
<?php if ($pconfig['mode'] == "carp") echo "checked";?>> <?=gettext("CARP"); ?>
<input name="mode" type="radio" onclick="enable_change()" value="proxyarp"
- <?php if ($pconfig['mode'] == "proxyarp" || $pconfig['type'] != "carp") echo "checked";?>> <?=gettext("Proxy ARP"); ?>
+ <?php if ($pconfig['mode'] == "proxyarp") echo "checked";?>> <?=gettext("Proxy ARP"); ?>
<input name="mode" type="radio" onclick="enable_change()" value="other"
<?php if ($pconfig['mode'] == "other") echo "checked";?>> <?=gettext("Other");?>
</td>
OpenPOWER on IntegriCloud