Project

General

Profile

« Previous | Next » 

Revision a0d1a467

Added by Jim Pingle about 13 years ago

Protect against a potential infinite loop here.

View differences:

usr/local/www/firewall_nat_out.php
138 138

  
139 139
					/* PPTP subnet */
140 140
					if (($config['pptpd']['mode'] == "server") && is_private_ip($config['pptpd']['remoteip'])) {
141
						$pptptopip = $config['pptpd']['n_pptp_units'] - 1; 
141
						$pptp_size = empty($config['pptpd']['n_pptp_units']) ? 16 : $config['pptpd']['n_pptp_units'];
142
						$pptptopip = $pptp_size - 1;
142 143
						$pptp_subnets = ip_range_to_subnet_array($config['pptpd']['remoteip'], long2ip32(ip2long($config['pptpd']['remoteip'])+$pptptopip));
143 144
						foreach ($pptp_subnets as $pptpsn) {
144 145
							$natent = array();

Also available in: Unified diff