Since $realhwif is the parent interface, it doesn't make sense to check for _vlan. We might as well remove the check and leave the rest as is, since it only triggers when either media or mediaopt is set.
This commit is contained in:
Ad Schellevis 2019-07-12 12:10:01 +02:00
parent 0a73a6f75f
commit 028e7a260d

View File

@ -2435,8 +2435,8 @@ function interface_configure($verbose = false, $interface = 'wan', $reload = fal
}
}
/* skip vlans for media setup and only apply when changed */
if (!stristr($realhwif, "_vlan") && (!empty($wancfg['media']) || !empty($wancfg['mediaopt']))) {
/* only try to set media properties on (parent) device when requested */
if (!empty($wancfg['media']) || !empty($wancfg['mediaopt'])) {
$intf_details = legacy_interface_details($realhwif);
$media_changed = stripos($intf_details['media_raw'], $wancfg['media']) == false;
if (!empty($wancfg['mediaopt'])) {