mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Do not log useless log and do the check earlier as a microoptimization.
This commit is contained in:
parent
8a4778d31a
commit
0bca02ca58
@ -998,6 +998,8 @@ function interface_ppps_configure($interface) {
|
||||
mwexec("/bin/ln -s /usr/local/sbin/mpd.script {$g['varetc_path']}/.");
|
||||
|
||||
$ifcfg = &$config['interfaces'][$interface];
|
||||
if (!isset($ifcfg['enable']))
|
||||
return 0;
|
||||
if (is_array($config['ppps']['ppp']) && count($config['ppps']['ppp'])) {
|
||||
foreach ($config['ppps']['ppp'] as $pppid => $ppp) {
|
||||
if ($ifcfg['if'] == $ppp['if'])
|
||||
@ -1008,10 +1010,6 @@ function interface_ppps_configure($interface) {
|
||||
log_error("Can't find PPP config for {$ifcfg['if']} in interface_ppps_configure().");
|
||||
return 0;
|
||||
}
|
||||
if (!isset($ifcfg['enable'])) {
|
||||
log_error("{$interface} is not enabled.");
|
||||
return 0;
|
||||
}
|
||||
$pppif = $ifcfg['if'];
|
||||
if ($ppp['type'] == "ppp")
|
||||
$type = "modem";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user