mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 00:54:41 +00:00
interfaces: fix ambiguity in get_parent_interface()
So having changed get_real_interface() to not check edge cases for existing interfaces has bubbled up this check to the caller get_parent_interface() which in turn made the check global. The problem is that get_parent_interface() ran a hypothentical code path through get_real_interface() and subsequently now fails for dailup types leaving an empty interface. That in turn caused some other refactoring to break where individual device functions would take an argument or reload all interfaces. Now that dailup fiddles with get_parent_interface() and overwrites the result of get_real_interface() in the main interface_configure() run it would reconfigure previously configured devices stripping their IP configuration in the process. Yikes! :) PR: https://forum.opnsense.org/index.php?topic=13442.0
This commit is contained in:
parent
b2294eae1b
commit
6ae356678d
@ -3588,9 +3588,6 @@ function get_parent_interface($interface, $avoidrecurse = false)
|
||||
$parents = array();
|
||||
|
||||
$realif = get_real_interface($interface);
|
||||
if (!does_interface_exist($realif)) {
|
||||
return $parents;
|
||||
}
|
||||
|
||||
// If we got a real interface, find it's friendly assigned name
|
||||
if ($interface == $realif && $avoidrecurse == false) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user