From 6ae356678dde970b54f74fe8a58448a1904eaa29 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Thu, 11 Jul 2019 09:20:16 +0200 Subject: [PATCH] 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 --- src/etc/inc/interfaces.inc | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc index 28ee46725..e0740271a 100644 --- a/src/etc/inc/interfaces.inc +++ b/src/etc/inc/interfaces.inc @@ -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) {