interfaces: remove indirection for #6489

This commit is contained in:
Franco Fichtner 2023-04-17 08:36:46 +02:00
parent 6fd0bc54e2
commit 97d10e1ed3

View File

@ -3951,13 +3951,12 @@ function get_interfaces_info($include_unlinked = false)
}
}
}
$dev = $ppp['ports'];
if ($config['interfaces'][$ifdescr]['if'] != $ppp['if'] || empty($dev)) {
if ($config['interfaces'][$ifdescr]['if'] != $ppp['if'] || empty($ppp['ports'])) {
break;
}
if (!file_exists($dev)) {
if (!file_exists($ppp['ports'])) {
$ifinfo['nodevice'] = 1;
$ifinfo['pppinfo'] = $dev . " " . gettext("device not present! Is the modem attached to the system?");
$ifinfo['pppinfo'] = $ppp['ports'] . " " . gettext("device not present! Is the modem attached to the system?");
}
// Calculate cumulative uptime for PPP link. Useful for connections that have per minute/hour contracts so you don't go over!