summaryrefslogtreecommitdiffstats
path: root/usr/local/www
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2012-08-01 14:45:41 -0400
committerjim-p <jimp@pfsense.org>2012-08-01 14:45:41 -0400
commita0d1a4678e02dcbea42d24d1f731aad4007486d3 (patch)
tree657a999f7b53328d7ef0296d0c091de10c664320 /usr/local/www
parentbfede3d446d288f014af12ab28614736859ed917 (diff)
downloadpfsense-a0d1a4678e02dcbea42d24d1f731aad4007486d3.zip
pfsense-a0d1a4678e02dcbea42d24d1f731aad4007486d3.tar.gz
Protect against a potential infinite loop here.
Diffstat (limited to 'usr/local/www')
-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 3091ab0..5098532 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'])) {
- $pptptopip = $config['pptpd']['n_pptp_units'] - 1;
+ $pptp_size = empty($config['pptpd']['n_pptp_units']) ? 16 : $config['pptpd']['n_pptp_units'];
+ $pptptopip = $pptp_size - 1;
$pptp_subnets = ip_range_to_subnet_array($config['pptpd']['remoteip'], long2ip32(ip2long($config['pptpd']['remoteip'])+$pptptopip));
foreach ($pptp_subnets as $pptpsn) {
$natent = array();
OpenPOWER on IntegriCloud