1
|
--- backup-stock-image-20100320/www/interfaces_assign.php 2010-03-23 13:43:07.000000000 +0700
|
2
|
+++ interfaces_assign.php.new 2010-03-24 13:24:48.000000000 +0700
|
3
|
@@ -127,12 +127,11 @@
|
4
|
|
5
|
/* add PPP interfaces */
|
6
|
if (is_array($config['ppps']['ppp']) && count($config['ppps']['ppp'])) {
|
7
|
- $i = 0;
|
8
|
foreach ($config['ppps']['ppp'] as $ppp) {
|
9
|
- $portname = 'ppp_' . basename($ppp['port']);
|
10
|
+ $portname = "ppp{$ppp['pppid']}";
|
11
|
+ log_error("portname = " . $portname);
|
12
|
$portlist[$portname] = $ppp;
|
13
|
$portlist[$portname]['isppp'] = true;
|
14
|
- $i++;
|
15
|
}
|
16
|
}
|
17
|
|
18
|
@@ -202,9 +201,10 @@
|
19
|
$reloadif = true;
|
20
|
}
|
21
|
$config['interfaces'][$ifname]['if'] = $ifport;
|
22
|
- if (preg_match('/^ppp_(.+)$/', $ifport, $matches)) {
|
23
|
+ if (preg_match('/^ppp[0-9]+/',$ifport)){
|
24
|
+ $config['interfaces'][$ifname]['serialport'] = basename($portlist[$ifport]['port']);
|
25
|
$config['interfaces'][$ifname]['pointtopoint'] = true;
|
26
|
- $config['interfaces'][$ifname]['serialport'] = $matches[1];
|
27
|
+ $config['interfaces'][$ifname]['ipaddr'] = "ppp";
|
28
|
} else {
|
29
|
unset($config['interfaces'][$ifname]['pointtopoint']);
|
30
|
unset($config['interfaces'][$ifname]['serialport']);
|
31
|
@@ -412,7 +412,7 @@
|
32
|
$descr .= " (" . $portinfo['descr'] . ")";
|
33
|
echo htmlspecialchars($descr);
|
34
|
} elseif ($portinfo['isppp']) {
|
35
|
- $descr = "PPP {$portinfo['port']}";
|
36
|
+ $descr = "{$portname} {$portinfo['port']}";
|
37
|
if ($portinfo['descr'])
|
38
|
$descr .= " (" . $portinfo['descr'] . ")";
|
39
|
echo htmlspecialchars($descr);
|