summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_rules_edit.php
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2013-02-16 18:01:10 -0200
committerRenato Botelho <garga@FreeBSD.org>2013-02-16 18:01:10 -0200
commit507aa90af48b14ffaab6664c708a3b03d723164c (patch)
tree5a0e2e92c8c18d1b2cb4f8264547a714a94e0031 /usr/local/www/firewall_rules_edit.php
parenteed8df6f61ac28c5a636953697a6c88373678bcf (diff)
downloadpfsense-507aa90af48b14ffaab6664c708a3b03d723164c.zip
pfsense-507aa90af48b14ffaab6664c708a3b03d723164c.tar.gz
Set (src|dst)mask to 128 for single IPv6 addresses. Fixes #2451
Diffstat (limited to 'usr/local/www/firewall_rules_edit.php')
-rwxr-xr-xusr/local/www/firewall_rules_edit.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php
index 5cf6348..b205c46 100755
--- a/usr/local/www/firewall_rules_edit.php
+++ b/usr/local/www/firewall_rules_edit.php
@@ -289,13 +289,19 @@ if ($_POST) {
$_POST['src'] = $_POST['srctype'];
$_POST['srcmask'] = 0;
} else if ($_POST['srctype'] == "single") {
- $_POST['srcmask'] = 32;
+ if (is_ipaddrv6($_POST['src']))
+ $_POST['srcmask'] = 128;
+ else
+ $_POST['srcmask'] = 32;
}
if (is_specialnet($_POST['dsttype'])) {
$_POST['dst'] = $_POST['dsttype'];
$_POST['dstmask'] = 0;
} else if ($_POST['dsttype'] == "single") {
- $_POST['dstmask'] = 32;
+ if (is_ipaddrv6($_POST['dst']))
+ $_POST['dstmask'] = 128;
+ else
+ $_POST['dstmask'] = 32;
}
$pconfig = $_POST;
OpenPOWER on IntegriCloud