From 028e7a260da4cf1f93ef2d3f46715788e8cfc512 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Fri, 12 Jul 2019 12:10:01 +0200 Subject: [PATCH] interfaces, cleanup. while working on https://github.com/opnsense/core/issues/3567 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. --- src/etc/inc/interfaces.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc index 70a6f861b..f7fd31bf0 100644 --- a/src/etc/inc/interfaces.inc +++ b/src/etc/inc/interfaces.inc @@ -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'])) {