mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 17:14:46 +00:00
interfaces: return $ifname and decouple the search loop
This looks like a typo in the original code as we expect to return a "wan|lan|optx" thingy. "Parent" lookup isn't really very useful except for PPP types. The question is if there is an edge case that would still allow this to resolve when the other code preceeding it can not.
This commit is contained in:
parent
351295ecba
commit
024c7e1694
@ -3536,10 +3536,13 @@ function convert_real_interface_to_friendly_interface_name($interface = 'wan')
|
||||
if (get_real_interface($ifname) == $interface) {
|
||||
return $ifname;
|
||||
}
|
||||
}
|
||||
|
||||
// search unnecessary?
|
||||
foreach (array_keys($all_interfaces) as $ifname) {
|
||||
list ($ifparent) = get_parent_interface($ifname);
|
||||
if ($ifparent == $interface) {
|
||||
return $ifparent;
|
||||
return $ifname;
|
||||
}
|
||||
}
|
||||
|
||||
@ -3658,7 +3661,6 @@ function get_parent_interface($interface)
|
||||
return $parents;
|
||||
}
|
||||
|
||||
|
||||
function interface_get_wireless_base($wlif)
|
||||
{
|
||||
if (!strstr($wlif, '_wlan')) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user