interfaces: remove unused is_interface_assigned()

This commit is contained in:
Franco Fichtner 2025-04-24 08:16:17 +02:00
parent 4ce4450537
commit 5aa8d206e6

View File

@ -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;
}