From 6ff74b9511d349e3d969855fb49be193b612108a Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Mon, 6 Dec 2021 17:06:27 +0100 Subject: [PATCH] interfaces: remove previously broken code Since the code was only fixed in 024c7e1694 and the lookup is questionable (especially on IPv4 real interface which is vanilla as opposed to PPP IPv6 shifting). The problem with e.g. a wan: pppoe0 -> em1 situation is that if you assign em1 the answer to the query shifts from "wan" to "opt1" so we would rather miss the situation to resolve "em1" since the correct interface is "pppoe0" anyway. Also looking at callers of convert_real_interface_to_friendly_interface_name() there isn't a PPP-related call in there anyway that would require this. --- src/etc/inc/interfaces.inc | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc index 31b896899..69b95ea32 100644 --- a/src/etc/inc/interfaces.inc +++ b/src/etc/inc/interfaces.inc @@ -3531,13 +3531,6 @@ function convert_real_interface_to_friendly_interface_name($interface = 'wan') } } - // search unnecessary? - foreach (array_keys($all_interfaces) as $ifname) { - if (get_parent_interface($ifname) == $interface) { - return $ifname; - } - } - if ($interface == 'enc0') { return 'IPsec'; }