summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_rules_edit.php
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2013-02-13 11:06:22 -0200
committerRenato Botelho <garga@FreeBSD.org>2013-02-13 11:06:22 -0200
commitcb2b59b89b4d7fb6449c0f45d142302dd2029373 (patch)
tree42d510039538199b718b0f4cd01e2c8291010931 /usr/local/www/firewall_rules_edit.php
parent96ccd0095e6b7258abf6fa39b262321b65508f48 (diff)
downloadpfsense-cb2b59b89b4d7fb6449c0f45d142302dd2029373.zip
pfsense-cb2b59b89b4d7fb6449c0f45d142302dd2029373.tar.gz
Deal correct with /32 subnet mask for ipv6 addresses. If fixes #2451
Diffstat (limited to 'usr/local/www/firewall_rules_edit.php')
-rwxr-xr-xusr/local/www/firewall_rules_edit.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php
index 3bec648..2cdcdbb 100755
--- a/usr/local/www/firewall_rules_edit.php
+++ b/usr/local/www/firewall_rules_edit.php
@@ -900,7 +900,11 @@ include("head.inc");
<?php
$sel = is_specialnet($pconfig['src']); ?>
<option value="any" <?php if ($pconfig['src'] == "any") { echo "selected"; } ?>><?=gettext("any");?></option>
- <option value="single" <?php if (($pconfig['srcmask'] == 32) && !$sel) { echo "selected"; $sel = 1; } ?>><?=gettext("Single host or alias");?></option>
+ <option value="single" <?php
+ if (!$sel &&
+ ((is_ipaddrv6($pconfig['src']) && ($pconfig['srcmask'] == 128)) ||
+ (is_ipaddrv4($pconfig['src']) && ($pconfig['srcmask'] == 32)))
+ ) { echo "selected"; $sel = 1; } ?>> <?=gettext("Single host or alias");?></option>
<option value="network" <?php if (!$sel) echo "selected"; ?>><?=gettext("Network");?></option>
<?php if(have_ruleint_access("pptp")): ?>
<option value="pptp" <?php if ($pconfig['src'] == "pptp") { echo "selected"; } ?>><?=gettext("PPTP clients");?></option>
OpenPOWER on IntegriCloud