From 5aa8d206e684afefe7e5194213ce6011375f094e Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Thu, 24 Apr 2025 08:16:17 +0200 Subject: [PATCH] interfaces: remove unused is_interface_assigned() --- src/etc/inc/util.inc | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/src/etc/inc/util.inc b/src/etc/inc/util.inc index 14ac5ec5f..0bf6b85c2 100644 --- a/src/etc/inc/util.inc +++ b/src/etc/inc/util.inc @@ -1267,27 +1267,3 @@ function dhcp6c_duid_clear() /* clear the backup so that it will not be restored: */ @unlink('/conf/dhcp6c_duid'); } - -/** - * check if interface is assigned - * @param $interface technical interface name - * @return string interface name (lan, wan, optX) - */ -function is_interface_assigned($interface) -{ - global $config; - - foreach (legacy_config_get_interfaces() as $if => $intf) { - if (isset($intf['if']) && $intf['if'] == $interface) { - return true; - } - } - if (isset($config['vlans']['vlan'])) { - foreach ($config['vlans']['vlan'] as $vlan) { - if ($vlan['if'] == $interface) { - return true; - } - } - } - return false; -}