diff mbox series

[5/5] Always bring up network interfaces

Message ID b6253452710d4f2e687361effe21687adb95c877.1587059224.git.weeksd2@rpi.edu
State New
Headers show
Series IB netboot 3/3: IB interface bring up | expand

Commit Message

Daniel M. Weeks April 16, 2020, 6:02 p.m. UTC
This is necessary to process IB interfaces when a specific interface has
been selected for DHCP, otherwise IB interfaces will not be listed in
the info or config UIs.

When IB interfaces are first discovered, they do not have a unique
hardware address so they are not registered. Bringing them up even if
they won't ultimately be configured gives them a second chance to be
registered.

Signed-off-by: Daniel M. Weeks <weeksd2@rpi.edu>
---
 discover/network.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
diff mbox series

Patch

diff --git a/discover/network.c b/discover/network.c
index 5f3a05c..b00190e 100644
--- a/discover/network.c
+++ b/discover/network.c
@@ -522,15 +522,6 @@  static void configure_interface(struct network *network,
 		return;
 	}
 
-	/* if we're in manual config mode, we need an interface configuration */
-	if (network->manual_config && !config) {
-		interface->state = IFSTATE_IGNORED;
-		pb_log("network: skipping %s: manual config mode, "
-				"but no config for this interface\n",
-				interface->name);
-		return;
-	}
-
 	/* new interface? bring up to the point so we can detect a link */
 	if (interface->state == IFSTATE_NEW) {
 		if (!up) {
@@ -544,6 +535,15 @@  static void configure_interface(struct network *network,
 		}
 	}
 
+	/* if we're in manual config mode, we need an interface configuration */
+	if (network->manual_config && !config) {
+		interface->state = IFSTATE_IGNORED;
+		pb_log("network: skipping %s: manual config mode, "
+				"but no config for this interface\n",
+				interface->name);
+		return;
+	}
+
 	/* no link? wait for a notification */
 	if (interface->state == IFSTATE_UP_WAITING_LINK && !link)
 		return;