Fix vpn_pppoe_get_id and stop duplicating pppoeid for multiple servers, it fixes #2286

This commit is contained in:
Renato Botelho 2013-12-09 09:22:03 -02:00
parent 9b74931109
commit d8b011b8e6

View File

@ -43,9 +43,9 @@ function vpn_pppoe_get_id() {
global $config;
$vpnid = 1;
if (!is_array($config['pppoes']['pppoe'])) {
if (is_array($config['pppoes']['pppoe'])) {
foreach ($config['pppoes']['pppoe'] as $pppoe) {
if ($vpnid == $pppoe['id'])
if ($vpnid == $pppoe['pppoeid'])
$vpnid++;
else
return $vpnid;