summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2011-09-09 04:39:30 -0400
committerChris Buechler <cmb@pfsense.org>2011-09-09 04:40:28 -0400
commit65319e4cacee64399619725c9fd0655ba9815a55 (patch)
treeccc280913172342151123c4318d277f9456515ee
parentd523215bd2c82b468f35c238d0762ce461d78cea (diff)
downloadpfsense-65319e4cacee64399619725c9fd0655ba9815a55.zip
pfsense-65319e4cacee64399619725c9fd0655ba9815a55.tar.gz
fix firewall_nat_out to not auto-generate outbound NAT rules with one too many IPs
-rwxr-xr-xusr/local/www/firewall_nat_out.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr/local/www/firewall_nat_out.php b/usr/local/www/firewall_nat_out.php
index 9c0c331..a98bbbf 100755
--- a/usr/local/www/firewall_nat_out.php
+++ b/usr/local/www/firewall_nat_out.php
@@ -138,7 +138,8 @@ if (isset($_POST['save']) && $_POST['save'] == "Save") {
/* PPTP subnet */
if (($config['pptpd']['mode'] == "server") && is_private_ip($config['pptpd']['remoteip'])) {
- $pptp_subnets = ip_range_to_subnet_array($config['pptpd']['remoteip'], long2ip32(ip2long($config['pptpd']['remoteip'])+$config['pptpd']['n_pptp_units']));
+ $pptptopip = $config['pptpd']['n_pptp_units'] - 1;
+ $pptp_subnets = ip_range_to_subnet_array($config['pptpd']['remoteip'], long2ip32(ip2long($config['pptpd']['remoteip'])+$pptptopip));
foreach ($pptp_subnets as $pptpsn) {
$natent = array();
$natent['source']['network'] = $pptpsn;
OpenPOWER on IntegriCloud