mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 00:07:26 +00:00
interfaces: remove unused is_interface_assigned()
This commit is contained in:
parent
4ce4450537
commit
5aa8d206e6
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user