diff options
author | Renato Botelho <garga@FreeBSD.org> | 2013-02-16 18:01:10 -0200 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2013-02-16 18:01:10 -0200 |
commit | 507aa90af48b14ffaab6664c708a3b03d723164c (patch) | |
tree | 5a0e2e92c8c18d1b2cb4f8264547a714a94e0031 /usr/local/www/firewall_rules_edit.php | |
parent | eed8df6f61ac28c5a636953697a6c88373678bcf (diff) | |
download | pfsense-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-x | usr/local/www/firewall_rules_edit.php | 10 |
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; |