Project

General

Profile

« Previous | Next » 

Revision 611ae852

Added by Ermal LUÇI over 15 years ago

Redo most of the ppp interface handling to be consistent with the other mpd5 configurations. This way there is no more special handling for ppp around.

View differences:

usr/local/www/interfaces_assign.php
127 127

  
128 128
/* add PPP interfaces */
129 129
if (is_array($config['ppps']['ppp']) && count($config['ppps']['ppp'])) {
130
	foreach ($config['ppps']['ppp'] as $ppp) {
131
		$portname = "ppp{$ppp['pppid']}";
132
		log_error("portname = " . $portname);
130
	foreach ($config['ppps']['ppp'] as $pppid => $ppp) {
131
		$portname = "ppp{$pppid}";
133 132
		$portlist[$portname] = $ppp;
134 133
		$portlist[$portname]['isppp'] = true;
134
		$portlist[$portname]['descr'] = "PPP {$ppp['port']}";
135 135
	}
136 136
}
137 137

  
......
202 202
					}
203 203
					$config['interfaces'][$ifname]['if'] = $ifport;
204 204
					if (preg_match('/^ppp[0-9]+/',$ifport)){
205
						$config['interfaces'][$ifname]['serialport'] =  basename($portlist[$ifport]['port']);
206
						$config['interfaces'][$ifname]['pointtopoint'] = true;
205
						$config['interfaces'][$ifname]['if'] =  basename($portlist[$ifport]['port']);
207 206
						$config['interfaces'][$ifname]['ipaddr'] = "ppp";
208
					} else {
209
						unset($config['interfaces'][$ifname]['pointtopoint']);
210
						unset($config['interfaces'][$ifname]['serialport']);
211 207
					}
212 208

  
213 209
					/* check for wireless interfaces, set or clear ['wireless'] */

Also available in: Unified diff