From 198de61c02a3ed537f9f4dae4fe84115f9352f3d Mon Sep 17 00:00:00 2001 From: "Johnny S. Lee" <6614805+johnnyslee@users.noreply.github.com> Date: Thu, 14 Jul 2022 11:05:43 +0800 Subject: [PATCH] interfaces: Fix unable to bring up multiple loopback This fixes a bug: * Loopback interfaces other than the one being configured/created are all going to be removed/destroyed. --- src/etc/inc/plugins.inc.d/loopback.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/etc/inc/plugins.inc.d/loopback.inc b/src/etc/inc/plugins.inc.d/loopback.inc index e6fa7cb08..bcaf74ed8 100644 --- a/src/etc/inc/plugins.inc.d/loopback.inc +++ b/src/etc/inc/plugins.inc.d/loopback.inc @@ -83,12 +83,12 @@ function loopback_configure_do($verbose = false, $device = null) // (re)configure loopback devices foreach ($loopbacks as $loopback) { $device_name = "lo{$loopback->deviceId}"; + $configured_devices[] = $device_name; if ($device !== null && $device != $device_name) { continue; } - $configured_devices[] = $device_name; if (!in_array($device_name, $configured_interfaces)) { mwexecf('/sbin/ifconfig %s create', [$device_name]); }