From bb37fa89e72611c7680bba33cba22e0dd114d0d2 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Tue, 4 Mar 2025 15:46:04 +0100 Subject: [PATCH] interfaces: kill another "realif" side effect This inline-assign shouldn't happen anymore (likely a very early version using the wlan device name implicitly). Maybe for 25.7, needs a tiny code audit at one point but since the other cruft changes are in 25.1.3 this makes sense to push. --- src/etc/inc/interfaces.inc | 5 ----- src/opnsense/mvc/app/models/OPNsense/Routing/Gateways.php | 4 ---- .../scripts/health/library/OPNsense/RRD/Stats/Base.php | 4 ---- 3 files changed, 13 deletions(-) diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc index 346c7d083..893f2a755 100644 --- a/src/etc/inc/interfaces.inc +++ b/src/etc/inc/interfaces.inc @@ -3552,11 +3552,6 @@ function get_real_interface($interface = 'wan', $family = 'all') $realif = $config['interfaces'][$interface]['if']; - /* XXX this is either impossibe to reach nowadays or requires an interface migration */ - if (isset($config['interfaces'][$interface]['wireless']) && !strstr($realif, '_wlan')) { - $realif .= '_wlan0'; - } - if ($family == 'inet6') { switch ($config['interfaces'][$interface]['ipaddrv6'] ?? 'none') { case '6rd': diff --git a/src/opnsense/mvc/app/models/OPNsense/Routing/Gateways.php b/src/opnsense/mvc/app/models/OPNsense/Routing/Gateways.php index 13269d641..e18680c19 100644 --- a/src/opnsense/mvc/app/models/OPNsense/Routing/Gateways.php +++ b/src/opnsense/mvc/app/models/OPNsense/Routing/Gateways.php @@ -262,10 +262,6 @@ class Gateways extends BaseModel $ifcfg = $definedIntf[$ifname]; $realif = $ifcfg['if']; - if (isset($ifcfg['wireless']) && !strstr($realif, '_wlan')) { - $realif .= '_wlan0'; - } - if ($ipproto == 'inet6') { switch ($ifcfg['ipaddrv6'] ?? 'none') { case '6rd': diff --git a/src/opnsense/scripts/health/library/OPNsense/RRD/Stats/Base.php b/src/opnsense/scripts/health/library/OPNsense/RRD/Stats/Base.php index 5f04d3e3f..5ae4b9986 100755 --- a/src/opnsense/scripts/health/library/OPNsense/RRD/Stats/Base.php +++ b/src/opnsense/scripts/health/library/OPNsense/RRD/Stats/Base.php @@ -78,10 +78,6 @@ abstract class Base 'name' => !empty((string)$node->descr) ? (string)$node->descr : $ifname, 'if' => (string)$node->if ]; - /* relevant parts from get_real_interface() using in old rrd.inc */ - if (isset($node->wireless) && !strstr((string)$node->if, '_wlan')) { - self::$metadata['interfaces'][$ifname]['if'] .= '_wlan0'; - } } } foreach ((new \OPNsense\OpenVPN\OpenVPN())->serverDevices() as $ifname => $data) {