Skip to content

Commit

Permalink
Set (src|dst)mask to 128 for single IPv6 addresses. Fixes pfsense#2451
Browse files Browse the repository at this point in the history
  • Loading branch information
rbgarga committed Feb 16, 2013
1 parent eed8df6 commit 507aa90
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions usr/local/www/firewall_rules_edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -289,13 +289,19 @@
$_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;
Expand Down

0 comments on commit 507aa90

Please sign in to comment.