fix firewall_nat_out to not auto-generate outbound NAT rules with one too many IPs

This commit is contained in:
Chris Buechler 2011-09-09 04:39:30 -04:00
parent 7c7d856ccb
commit 70ec6cc296

View File

@ -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;